0

So I followed this guide to set up letsencrypt ssl for nginx using the acme script, and it all worked great, I have it setup and I can access my site (wasabi.guru) via ssl, however it returns with a 404 error. When accessing my site via non-https it does not return a 404 error and is just peachy, it's only when I try to go to https://wasabi.guru that it gives me a 404. what on earth gives?

server {
    server_name wasabi.guru;
    ssl on;
    listen 443 ssl;
    listen [::]:433 ssl;
    ssl_certificate /etc/nginx/ssl/wasabi.guru.cer;
    ssl_certificate_key /etc/nginx/ssl/wasabi.guru.key;
    ssl_session_timeout 30m;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES$
    ssl_session_cache shared:SSL:10m;
    ssl_dhparam /etc/nginx/ssl/dhparams.pem;
    ssl_prefer_server_ciphers on;

    ssl_buffer_size 8k;

    ssl_stapling on;
    resolver 8.8.8.8;
    ssl_stapling_verify on;

    add_header Strict-Transport-Security max-age=31536000

    access_log /var/log/nginx/wasabi.guru/ssl_access.log;
    error_log /var/log/nginx/wasabi.guru/ssl_error.log

    ## END SSL CONFIG ##

    location / {
            root    /usr/share/nginx/html/;
            index   index.html index.htm;
    }
}

From what I know, and can tell, this is all correct and should just work, i've changed it a couple times and still nothing, i've looked at the ssl config thing for wasabi.guru to make sure the doc root is the same and it is. Let me be straight, im a super noob at this kind of stuff still, this is my first experience with setting up ssl and i usually just use default configs for nginx, so if theres something im missing im sure i wouldnt catch it.

Any info would be great, if theres any logs or config files that would help solve this just say so and i'll post them.

Thanks for the help.

ps: this server is running Arch Linux, which is a bad idea yes, but i live on the edge :^)

  • Please post the configuration for your SSL and non-SSL nginx servers. 404 means resource not found, so most likely problem is the document root. – Tim Oct 12 '16 at 18:32
  • Ok so something more must be wrong, cause i just realized theres no other server block for a non-ssl server... theres only the one? – Elijah Rohrbaugh Oct 12 '16 at 19:12
  • If that's your entire server configuration I can't see how it would be servicing requests on port 80 / http. I can see that nginx 1.10.1 is serving both http and https. There must be another server block - perhaps in your nginx.conf? – Tim Oct 12 '16 at 19:17
  • that IS the nginx.conf save for a few lines like ` include mime.types; ` and stuff like that, there are NO other server blocks, I'm so confused, what could i possibly have done? I have a backup config that does have two server blocks but that's named 'nginx.conf.backup' so it shouldnt be active – Elijah Rohrbaugh Oct 12 '16 at 19:20
  • wait i figured it out, i was using reload and not restart, i'm a huge dummy – Elijah Rohrbaugh Oct 12 '16 at 19:21
0

The answer to this was Elijah hadn't properly configured Nginx. In particular a restart of Nginx was not done.

This answer is submitted so the question can be marked as answered, reducing the need for others to read the question.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.