0

I have an Nginx server running a website, and I'd like to add a new host under a subdomain, to the main domain.

However as the title suggests, the subdomain's host seems to get ignored, and replaced by the main domain regardless.

Am I correct in assuming that the following statements, each in their own server block: server_name website.ws; server_name subdomain.website.ws;

Will always go to website.ws?

  • Use nginx -T (uppercase T) to view the entire configuration that Nginx is reading, and ensure that both server blocks are present. – Richard Smith Jul 22 at 10:22

Your Answer

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

Browse other questions tagged or ask your own question.