nginx plugin - force SSL not working

  • The nginx server tries to identify the local server via the host entry in the http header which is sent by the browser.
    On which port your nginx server is listening?
    Are you running it from web or in LAN area?
    I think there might be an issue with the subdomain not pointing to the right port.


    Openmediavault is configured to be the default server listening to the 80 / 443 ports. So either you change the config files (/etc/nginx/sites-enabled/) so both servers may listen to 80 or 443 just to different server_names, or you have to point the subdomain to another Port your server-config is running at.

  • all the name based servers created with the "websites (nginx) " plugin are listening to 443, but don't seem to have the


    listen [::]:80;


    statement - isn't that neccessary to force SSL?

    This is just the IPv6 version of

    Code
    listen 80;

    so not neccessary for SSL. For use with SSL there has to be a line like

    Code
    listen 443 ssl;
    listen [::]:443 ssl;


    Do you have SSH access to the server? Then please give us the content of all files in /etc/nginx/sites-enabled/ Then we might see, where the problem arises from

  • ../openmediavault-webgui


    example from ../openmediavault-nginx

  • Ok, as you see, the main difference is the

    Code
    listen [::]:443 default_server ipv6only=off ssl deferred;

    vs.

    Code
    listen [::]:443 ssl;

    So the nginx-server is listening only to ipv6. Try to add the following line to the extra options:

    Code
    listen 443 ssl;

    Then nginx should listen to ipv4 ssl port also for this server.

  • this prevents an nginx restart with

    Code
    root# /etc/init.d/nginx restart
    Restarting nginx: nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] bind() to 0.0.0.0:443 failed (98: Address already in use)
    nginx: [emerg] still could not bind()
    nginx.


    the ../openmediavault-nginx after adding the line to the extra options looks like this:


  • The plugin is working as intended, but I should rename the "Force SSL" option to something like "Only SSL". The Nginx configuration for OMV on the other hand redirects all requests to https.

  • Did some reading. We can accomplish this quite easiyly right now by haveing two domains with the same name, one listening on 443 (but not on 80), delivering the content and one listening on 80 (but not on 443) wth the opton


    Code
    return         301 https://$server_name$request_uri;

    in the Extras option field.


    Maybe you can implement an option for this?

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!