Created
July 7, 2013 11:18
-
-
Save purwandi/5943173 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
## PRODUCTION PUBLIC | |
server { | |
listen 80; | |
root <%= public_root %>; | |
index index.php index.html index.htm; | |
server_name <%= domain %>; | |
#Specify a charset | |
charset utf-8; | |
# Include the component config parts for h5bp | |
include conf/h5bp.conf; | |
# rewrite | |
location / { | |
try_files $uri /index.php?$query_string; | |
} | |
# pass the PHP scripts to FastCGI server | |
location ~ \.php$ { | |
# Zero-day exploit defense. | |
# http://forum.nginx.org/read.php?2,88845,page=3 | |
try_files $uri =404; | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
include /etc/nginx/fastcgi_params; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param MACHINE local; | |
## Custom FastCGI | |
fastcgi_send_timeout 900; | |
fastcgi_read_timeout 900; | |
fastcgi_buffer_size 512k; | |
fastcgi_buffers 16 256k; | |
fastcgi_busy_buffers_size 512k; | |
fastcgi_temp_file_write_size 512k; | |
fastcgi_intercept_errors on; | |
# fastcgi_intercept_errors on; | |
fastcgi_pass unix:/var/run/php5-fpm.sock; | |
} | |
# deny access to .htaccess files, if Apache's document root | |
location ~ /\.ht { | |
deny all; | |
} | |
access_log /var/log/nginx/<%= domain %>-access.log; | |
error_log /var/log/nginx/<%= domain %>-error.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment