Hi everyone,
I am new to nginx and trying to set it up on my local development machine running CentOS 5.3. I have two development sites: www.test1.loc and www.test2.loc that work perfectly fine with apache but I am struggling to make them work with nginx.
Here's the hosts file:
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
127.0.0.3 www.test1.loc
127.0.0.4 www.test2.loc
The "listen" part of httpd.conf file:
Listen 127.0.0.3:80
Listen 127.0.0.4:80
The "virtual hosts" part of httpd.conf:
<VirtualHost 127.0.0.3>
ServerName www.test1.loc
ServerAlias www*.test1.loc
ServerPath /
DocumentRoot "/var/www/test1/"
<Directory /var/www/test1>
AllowOverride All
</Directory>
</VirtualHost>
<VirtualHost 127.0.0.4>
ServerName www.test2.loc
ServerAlias www*.test2.loc
ServerPath /
DocumentRoot "/var/www/test2/"
<Directory /var/www/test2>
AllowOverride All
</Directory>
</VirtualHost>
Any help would be appreciated. Thanks in advance!