I have two domains domain1.com and domain2.com. The settings I have for domain1.com are: server { listen 80; server_name www.domain1.com; rewrite ^/(.*) http://domain1.com/$1 permanent; } server { listen 80; server_name domain1.com; access_log /home/test/public_html/domain1.com/log/acceby d3l0n - Nginx Mailing List - English