Skip to content

Instantly share code, notes, and snippets.

@Sethathi
Last active March 18, 2016 10:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sethathi/b52cf9750d9faa39702e to your computer and use it in GitHub Desktop.
Save Sethathi/b52cf9750d9faa39702e to your computer and use it in GitHub Desktop.
Nginx Vhost
server {
listen 80;
server_name localhost;
root /var/www/html/src;
index index.php index.html index.htm;
access_log /var/log/default.access.log;
error_log /var/log/default.error.log;
location / {
try_files $uri $uri/ /index.php?$args;
#include /usr/local/etc/nginx/conf.d/php-fpm;
}
#location = /info {
# allow 127.0.0.1;
# deny all;
# rewrite (.*) /.info.php;
# }
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
error_page 403 /403.html;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment