Beiträge von tinh_x7

    After I changed openmediavault-nginx file, I got an error:


    Code
    Restarting nginx: nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] bind() to [::]:80 failed (98: Address already in use)
    nginx: [emerg] still could not bind()
    nginx.


    Here's my new code:


    Edit: I got this error, if I'm using this code:

    Code
    server {
            listen 80;
            server_name 192.168.1.101; #YourIP or domain
            return 301 https://$server_name$request_uri;  # redirect all to use ssl
    }


    Error:

    Code
    sudo service nginx restart
    Restarting nginx: nginx: [emerg] "set" directive is not allowed here in /etc/nginx/sites-enabled/openmediavault-nginx:8
    nginx: configuration file /etc/nginx/nginx.conf test failed

    Am I change file openmediavault-nginx in /etc/nginx/sites-available?
    Here's my OC config:



    FYI: The above codes aren't my configuration.
    My server is currently offline.


    If I create a owncloud-redirect file by using this previous step, and use the above code, OC redirective should work, right?:


    Code
    /etc/nginx/sites-enabled
    touch omv-redirect 
    chmod 644 omv-redirect
    chown root:root omv-redirect


    Code
    listen [::]:80 default_server ipv6only=off;
        if ($scheme = http) {
            # Force redirection to HTTPS.
            return 301 https://$host$request_uri;
    }

    I'm currently using Owncloud 8 and MySQL: alternative approach


    I found this guide for MariaDB, but I'm not sure this is the right method or not for MySQL: https://www.howtoforge.com/tut…-and-mariadb-on-centos-7/
    I noticing that half of the below codes are implemented in Nginx options via OMV webgui.



    Are you saying I can't use nonstandard port while SSL/TLS enforce option is enabled?
    FYI: I'm not re-create omv-redirect file yet.





    Code
    ls -la /etc/nginx/sites-enabled
    total 8
    drwxr-xr-x 2 root root 4096 Sep  2 20:06 .
    drwxr-xr-x 6 root root 4096 Jul 25 16:49 ..
    lrwxrwxrwx 1 root root   39 Sep  2 20:06 openmediavault-nginx -> ../sites-available/openmediavault-nginx
    lrwxrwxrwx 1 root root   40 Jul 17 17:59 openmediavault-webgui -> ../sites-available/openmediavault-webgui

    Yes, that's correct.


    I'm using http 8080 for OMV b/c OC is using 80.
    Is port 8080 not suitable for OMV?



    Code
    tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      0          19019       8326/apache2
    tcp6       0      0 :::8080                 :::*                    LISTEN      0          19630       8275/nginx

    I got this error message after I restart nginx.
    I ran sudo netstat -nlp | grep :8080 , but nothing showed up.
    I then restart OMV, but OMV webpage is unable to load regardless if I entered local IP or my hostname.
    So, I removed the omv-redirect, then it working again.