Nginx subdomains not working

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I have this config for my nginx server



I can access only one of the 3 subdomains and I don't have clue why



server 

server_name example.com www.example.com other.example.com;

location /
proxy_pass http://localhost:8080;
# ...

location /restricted
proxy_pass http://localhost:8081;
# ...


include /etc/nginx/includes/certbot-server.conf;



server

server_name store.example.com;

location /
root /var/www/example.com/store/html;
index index.html index.htm index.nginx-debian.html;


include /etc/nginx/includes/certbot-server.conf;



server

if ($host ~ "(store.example.com


This is /etc/nginx/includes/certbot-server.conf :



listen [::]:443 ssl; # initially managed by Certbot, modified
listen 443 ssl; # initally managed by Certbot, modified
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


And I believe my DNS settings are correct, I have pointed each subdomain individually my server's IPs just to be sure.



I get a DNS_PROBE_FINISHED_NXDOMAIN error in Chrome, and a *Insert useless message here* in Firefox and Safari



I don't understand










share|improve this question









New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • You mention that you "can access only one of the 3 subdomains," which subdomain works? Also, what do the nginx logs say? What response codes does nginx return for the subdomains that "don't work?"
    – GracefulRestart
    21 mins ago














up vote
0
down vote

favorite












I have this config for my nginx server



I can access only one of the 3 subdomains and I don't have clue why



server 

server_name example.com www.example.com other.example.com;

location /
proxy_pass http://localhost:8080;
# ...

location /restricted
proxy_pass http://localhost:8081;
# ...


include /etc/nginx/includes/certbot-server.conf;



server

server_name store.example.com;

location /
root /var/www/example.com/store/html;
index index.html index.htm index.nginx-debian.html;


include /etc/nginx/includes/certbot-server.conf;



server

if ($host ~ "(store.example.com


This is /etc/nginx/includes/certbot-server.conf :



listen [::]:443 ssl; # initially managed by Certbot, modified
listen 443 ssl; # initally managed by Certbot, modified
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


And I believe my DNS settings are correct, I have pointed each subdomain individually my server's IPs just to be sure.



I get a DNS_PROBE_FINISHED_NXDOMAIN error in Chrome, and a *Insert useless message here* in Firefox and Safari



I don't understand










share|improve this question









New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.



















  • You mention that you "can access only one of the 3 subdomains," which subdomain works? Also, what do the nginx logs say? What response codes does nginx return for the subdomains that "don't work?"
    – GracefulRestart
    21 mins ago












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I have this config for my nginx server



I can access only one of the 3 subdomains and I don't have clue why



server 

server_name example.com www.example.com other.example.com;

location /
proxy_pass http://localhost:8080;
# ...

location /restricted
proxy_pass http://localhost:8081;
# ...


include /etc/nginx/includes/certbot-server.conf;



server

server_name store.example.com;

location /
root /var/www/example.com/store/html;
index index.html index.htm index.nginx-debian.html;


include /etc/nginx/includes/certbot-server.conf;



server

if ($host ~ "(store.example.com


This is /etc/nginx/includes/certbot-server.conf :



listen [::]:443 ssl; # initially managed by Certbot, modified
listen 443 ssl; # initally managed by Certbot, modified
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


And I believe my DNS settings are correct, I have pointed each subdomain individually my server's IPs just to be sure.



I get a DNS_PROBE_FINISHED_NXDOMAIN error in Chrome, and a *Insert useless message here* in Firefox and Safari



I don't understand










share|improve this question









New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I have this config for my nginx server



I can access only one of the 3 subdomains and I don't have clue why



server 

server_name example.com www.example.com other.example.com;

location /
proxy_pass http://localhost:8080;
# ...

location /restricted
proxy_pass http://localhost:8081;
# ...


include /etc/nginx/includes/certbot-server.conf;



server

server_name store.example.com;

location /
root /var/www/example.com/store/html;
index index.html index.htm index.nginx-debian.html;


include /etc/nginx/includes/certbot-server.conf;



server

if ($host ~ "(store.example.com


This is /etc/nginx/includes/certbot-server.conf :



listen [::]:443 ssl; # initially managed by Certbot, modified
listen 443 ssl; # initally managed by Certbot, modified
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot


And I believe my DNS settings are correct, I have pointed each subdomain individually my server's IPs just to be sure.



I get a DNS_PROBE_FINISHED_NXDOMAIN error in Chrome, and a *Insert useless message here* in Firefox and Safari



I don't understand







dns nginx webserver






share|improve this question









New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 27 mins ago





















New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 37 mins ago









Pamicel

12




12




New contributor




Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Pamicel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











  • You mention that you "can access only one of the 3 subdomains," which subdomain works? Also, what do the nginx logs say? What response codes does nginx return for the subdomains that "don't work?"
    – GracefulRestart
    21 mins ago
















  • You mention that you "can access only one of the 3 subdomains," which subdomain works? Also, what do the nginx logs say? What response codes does nginx return for the subdomains that "don't work?"
    – GracefulRestart
    21 mins ago















You mention that you "can access only one of the 3 subdomains," which subdomain works? Also, what do the nginx logs say? What response codes does nginx return for the subdomains that "don't work?"
– GracefulRestart
21 mins ago




You mention that you "can access only one of the 3 subdomains," which subdomain works? Also, what do the nginx logs say? What response codes does nginx return for the subdomains that "don't work?"
– GracefulRestart
21 mins ago















active

oldest

votes











Your Answer








StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);






Pamicel is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479961%2fnginx-subdomains-not-working%23new-answer', 'question_page');

);

Post as a guest



































active

oldest

votes













active

oldest

votes









active

oldest

votes






active

oldest

votes








Pamicel is a new contributor. Be nice, and check out our Code of Conduct.









 

draft saved


draft discarded


















Pamicel is a new contributor. Be nice, and check out our Code of Conduct.












Pamicel is a new contributor. Be nice, and check out our Code of Conduct.











Pamicel is a new contributor. Be nice, and check out our Code of Conduct.













 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f479961%2fnginx-subdomains-not-working%23new-answer', 'question_page');

);

Post as a guest













































































Popular posts from this blog

Peggy Mitchell

Palaiologos

The Forum (Inglewood, California)