# # A virtual host using mix of IP-, name-, and port-based configuration # server { listen 80; server_name www.domain.com; rewrite ^/(.*) http://domain.com/$1 permanent; } server { listen 80; server_name domain.com; access_log /home/demo/public_html/domain.com/log/access.log; error_log /home/demo/public_html/domain.com/log/error.log; # location / { location / { root /home/demo/public_html/domain.com/public/; index index.html index.htm index.php; } location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /home/demo/public_html/domain.com/public/$fastcgi_script_name; include fastcgi_params; } }