Last active
December 14, 2015 07:59
-
-
Save kbanman/5054710 to your computer and use it in GitHub Desktop.
nginx base config
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
user _www; | |
worker_processes 1; | |
#error_log /var/log/nginx.errors; | |
error_log /var/log/nginx.errors notice; | |
#error_log /var/log/nginx.errors info; | |
pid /usr/local/var/run/nginx.pid; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
log_format main '$remote_addr - $remote_user [$time_local] "$request" ' | |
'$status $body_bytes_sent "$http_referer" ' | |
'"$http_user_agent" "$http_x_forwarded_for"'; | |
#access_log /var/log/nginx.access main; | |
sendfile on; | |
#tcp_nopush on; | |
#keepalive_timeout 0; | |
keepalive_timeout 65; | |
#gzip on; | |
charset utf-8; | |
client_max_body_size 8M; | |
client_body_buffer_size 128k; | |
include sites/*; | |
} |
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
# Pass PHP scripts to PHP-FPM | |
location ~* \.php$ { | |
fastcgi_index index.php; | |
#fastcgi_pass 127.0.0.1:9000; | |
fastcgi_pass unix:/var/run/php-fpm.sock; | |
include fastcgi_params; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
fastcgi_read_timeout 600; | |
} |
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
# Set global SSL settings | |
ssl_session_timeout 5m; | |
ssl_protocols SSLv3 TLSv1; | |
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM; | |
ssl_prefer_server_ciphers on; | |
# Provide as much of Apache's SSL +StdEnvVars data as possible. | |
fastcgi_param HTTPS on; | |
fastcgi_param SSL_PROTOCOL $ssl_protocol; | |
fastcgi_param SSL_CIPHER $ssl_cipher; | |
fastcgi_param SSL_SESSION_ID $ssl_session_id; | |
fastcgi_param SSL_CLIENT_VERIFY $ssl_client_verify; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment