Skip to content

Instantly share code, notes, and snippets.

@stas
Created May 4, 2011 00:03
Show Gist options
  • Select an option

  • Save stas/954491 to your computer and use it in GitHub Desktop.

Select an option

Save stas/954491 to your computer and use it in GitHub Desktop.
nginx v.1.0 compatible vhost
server {
listen 80;
server_name courseware.nerd.ro;
access_log /var/log/nginx/localhost.access.log;
root /home/stas/Documente/www/cw/;
index index.php;
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment