Last active
March 18, 2016 10:17
-
-
Save Sethathi/b52cf9750d9faa39702e to your computer and use it in GitHub Desktop.
Nginx Vhost
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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