404 error on nginx/https

My domain is:neuman1812.duckdns.org

It produced this output:
404 Not found
My web server is (include version): nginx/1.10.3

The operating system my web server runs on is (include version):
Rasbian Stretch

My hosting provider, if applicable, is: self

I can login to a root shell on my machine (yes or no, or I don’t know): yes/ssh

I originally had a pi-hole server running, but had to take it off the network because I needed the machine. I made no change to my dhcpcd.conf or interfaces file on either of my other servers either before or after using pihole.

I have two raspberry pi servers running. One for home automation the other for media(torrenting). My home automation is running fine on https. But I’m getting 404 errors on my media. I can access the services on http and direct on 192.168.1.x address. but https gets 404.

I think I borked something on my router with the ports but Im not sure. My media server is running on a dmz.


Can you provide me with command you type and the exact output?

The command is just accessing the web page (https://neuman1812.duckdns.org/deluge). the exact output in the browswer is 404: Not Found

If you want the router to route traffic directly to both servers, you’ll probably have to put them on different (external) ports.

If you want to be able to access one server at https://neuman1812.duckdns.org and the other at https://neuman1812.duckdns.org/deluge, you could forward ports 80 and 443 to nginx, install the certificate there, and configure it with location blocks for / and /deluge to proxy to the two applications.

1 Like

I think this is what you mean? This is my nginx config. This was the original setup from back in december when it was working.

server {
listen 80;
server_name neuman1812.duckdns.org;

location /deluge {
 proxy_set_header  X-Deluge-Base "/deluge/";

added 12-22 for sonarr

location /sonarr {
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

added 12-22 for jackett

location /jackett {
 proxy_set_header Host $host;
 proxy_set_header X-Real-IP $remote_addr;
 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

This is my current port fwd setups on my router.


There is probably another virtual host file with with listen 443 https for this domain that is missing these proxy definitions. You could copy and paste the missing ones there, or you could consider redirecting http to https so there is no need to maintain them with plain http any longer.

1 Like

How Could I find that missing vhost file? the only thing listed in my sites-enabled directory is my one host.

/etc/nginx/sites-enabled# ls

I have no other nginx server running.

Hm. When I connect to https://neuman1812.duckdns.org I don’t see any nginx headers, only:

Server: Python/3.5 aiohttp/3.0.6

Did you install the cert directly to home assistant and forward the port from your router to that rather than nginx?

If so, you could change that so that the port is forwarded to nginx, and use e.g. certbot --nginx to set up the nginx config for you.

1 Like

Fixed it!
So I made a change before I even saw your post and I think what you said and what I did are what fixed it.

When I built Home assistant, one of the parts for encrypting it was to fwd port 443 to port 80 as part of the certbot process. So I removed that port fwd option and now everything works!

I was just going over the docs for the certbot process and one of the very last lines is to remove that 443 port fwd. Guess I missed that!


This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.