Created
September 3, 2015 06:20
-
-
Save aaronthorp/332a5b641765ed1a2676 to your computer and use it in GitHub Desktop.
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 default; | |
# server_name _; | |
root /app; | |
index index.php index.html index.htm; | |
location / { | |
# First attempt to serve request as file, then | |
# as directory, then trigger 404 | |
try_files $uri $uri/ =404; | |
} | |
# pass the PHP scripts to FastCGI server | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini | |
fastcgi_pass php; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
# deny access to .htaccess files, if Apache's document root | |
# concurs with nginx's one | |
location ~ /\.ht { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment