How to test nginx subdomains on localhost

Yes, add ‘127.0.0.1 sub.localhost’ to your hosts file. That sub has to be resolved somehow. That should work.

Then once you’re ready to go to the net, yes, add an a or cname record for the subdomain sub.

When I use proxy_pass I also include the proxy.conf from nginx.
http://wiki.nginx.org/HttpProxyModule

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)