0

I have Nginx running on a CentOS server where i installed Deluge and configured a server block for him. In my browser, mydomain.com redirects to Deluge webUI but www.mydomain.com redirects to a web page of the hoster. In my dns, i have an entry for "www" and "mydomain" to the server ip.

Here's the Deluge server block in /etc/nginx/conf.d/vhosts.conf :

server {
        listen 80;
        server_name mydomain.com www.mydomain.com;

        location / {
                proxy_pass http://www.localhost:8112;
                proxy_set_header X-Deluge-Base   "/";
        }
}

Have you any idea ? :)

1
  • can you provide a curl output for www.mydomain.com this will tell us if you are getting a redirect somewhere. Also as this could be a DNS problem the real domain name would be helpful
    – Drifter104
    Jan 11, 2017 at 17:04

2 Answers 2

0
  1. Check DNS to make sure propagation is working by using this site or dig.

    dig mydomain.com
    dig www.mydomain.com
    

    Verify that both of those point to the same IP address

  2. Your nginx configuration looks a little off. I would have used this:

    server {
        listen 80;
        server_name mydomain.com www.mydomain.com;
    
        location / {
            # proxy_pass http://www.localhost:8112;
            proxy_set_header X-Deluge-Base   "/";
            proxy_pass http://localhost:8112;
        }
    }
    
0

Thx for your answers ! Problem solved by passing to https. (I auto-generated a ssl cert)

Drifter 104 > curl sent me html code of hoster page.

2ps > I modified the vhost conf as following :

server {
        listen 443 ssl;
        server_name dl.domain.com www.dl.domain.com;
        ssl on;

        location / {
                proxy_pass http://localhost:8112;
                proxy_set_header X-Deluge-Base   "/";
        }
}

I also added ssl_sertificate entry in vhost conf and redirected all http flux to https.

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.