Welcome! Log In Create A New Profile

Advanced

Trouble with Subdomains in nginx

Posted by Th3Dan 
Trouble with Subdomains in nginx
January 08, 2012 12:05PM
Hello,

i use nginx for a vbulletin forum with a domain, let's say mydomain.com.
I want to add some other content on 2 subdomains, content1.mydomain.com and content2.mydomain.com.
So i have 3 serverblocks:

server {
server_name content1.mydomain.com;
[...]
}

server {
server_name content2.mydomain.com;
[...]
}

server {
server_name mydomain.com;
[...]
}

When i access a image on content2.mydomain.com nginx try to load the file from the root dir of content1.mydomain.com.
But mydomain.com works, only content2.mydomain.com didn't work.

What's wrong here?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 294
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready