Created
January 30, 2017 09:32
-
-
Save pangpond/72bad2921fe8aec8603e55b8141bc510 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 { | |
charset utf-8; | |
client_max_body_size 128M; | |
listen 80; | |
server_name frontend; | |
root /var/www/html; | |
index index.php; | |
access_log /var/log/nginx/frontend-access.log; | |
error_log /var/log/nginx/frontend-error.log; | |
location / { | |
# Redirect everything that isn't a real file to index.php | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_pass phpfpm:9000; | |
try_files $uri =404; | |
} | |
location ~ /\.(ht|svn|git) { | |
deny all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment