Sunday, August 1, 2010

final nginx config

server {
 listen 80;
 server_name localhost;
 access_log /var/www/lolhost/logs/access.log;
 error_log /var/www/lolhost/logs/error.log;
 index /index.php;

 location ~ \.(jpg|jpeg|gif|png|ico|css|bmp|js|swf)$ {
  root /var/www/lolhost/public_html;
 }

 location ~ \.(php|phtml)$ {
  fastcgi_pass 127.0.0.1:8888;
  fastcgi_index /index.php;
  fastcgi_param SCRIPT_FILENAME /var/www/lolhost/public_html$fastcgi_script_name;
  include /etc/nginx/fastcgi_params;
 }
 if (!-e $request_filename) {
   rewrite ^.*$ /index.php last;
 }
}

No comments:

Post a Comment