You are not logged in.

#1 2014-08-24 02:31:05

subraizada3
Member
Registered: 2013-06-02
Posts: 90

Nginx Subdomains

I am trying to set up a subdomain on my nginx server.
I have 2 config files called from /etc/nginx/nginx.conf: /etc/nginx/conf/hosts/main.conf and .../conf/hosts/es.conf
The main.conf is for my default site. I have been using it for a while and it works.
Here are its basic contents:

server {
        listen 80;
        server_name domain.com

        location / {
                root /srv/http;
                index index.html index.htm;
        }

and es.conf:

server {
        listen 80;
        server_name es.doamin.com;

        location / {
                root /srv/earthstar_http;
                index index.html index.htm;
                autoindex on;
        }
}

There are no errors give when I sudo systemctl restart nginx, and sudo nginx -t does not show anything. I set up the subdomain in my dynamic DNS service as a A-type DNS host. I can go to domain.com and www.domain.com fine and it works, but when I go to es.domain.com in my browser, the browser can't connect. I can ping es.domain.com just fine.

Offline

#2 2014-08-24 16:53:59

Stebalien
Member
Registered: 2010-04-27
Posts: 1,239
Website

Re: Nginx Subdomains

Please post /etc/nginx/nginx.conf.


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C

Offline

#3 2014-08-24 19:44:37

Spider.007
Member
Registered: 2004-06-20
Posts: 1,175

Re: Nginx Subdomains

Yeah it seems your es.conf simply isn't included in your nginx.conf

Offline

Board footer

Powered by FluxBB