Last active
December 31, 2015 05:29
-
-
Save ijin/7940999 to your computer and use it in GitHub Desktop.
Server Festa 2013 Autumn backend nginx.conf
This file contains hidden or 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
user nginx; | |
worker_processes 1; | |
error_log /var/log/nginx/error.log warn; | |
pid /var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
log_format main '$request_time $remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for" $upstream_response_time'; | |
access_log /var/log/nginx/access.log main; | |
sendfile on; | |
#tcp_nopush on; | |
keepalive_timeout 65; | |
gzip on; | |
gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; | |
client_max_body_size 100M; | |
client_header_buffer_size 1k; | |
large_client_header_buffers 8 8k; | |
server { | |
listen 8080; | |
server_name localhost; | |
location / { | |
root /home/csf/wordpress; | |
index index.html index.php; | |
} | |
location ~ \.php$ { | |
root /home/csf/wordpress; | |
fastcgi_pass unix:/tmp/php.socket; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_pass_header "X-Accel-Redirect"; | |
fastcgi_pass_header "X-Accel-Expires"; | |
} | |
location /wp-admin { | |
fastcgi_pass unix:/tmp/php.socket; | |
fastcgi_index index.php; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include fastcgi_params; | |
fastcgi_pass_header "X-Accel-Redirect"; | |
fastcgi_pass_header "X-Accel-Expires"; | |
} | |
location /alive { | |
return 200; | |
} | |
location /200 { | |
root /home/csf/test; | |
index index.html; | |
#return 200; | |
} | |
error_page 500 502 503 504 /50x.html; | |
location = /50x.html { | |
root /usr/share/nginx/html; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment