Created
July 1, 2016 09:03
-
-
Save MEGApixel23/6286d31cab2a5cde1a07d67fcb8a7b3c to your computer and use it in GitHub Desktop.
nginx HTTPS 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
server { | |
listen 80; | |
listen 443 ssl; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/adhoz_com.crt; | |
ssl_certificate_key /etc/nginx/ssl/adhoz.com; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:D$ | |
ssl_session_cache shared:SSL:10m; | |
ssl_prefer_server_ciphers on; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; | |
add_header X-Frame-Options DENY; | |
add_header X-Content-Type-Options nosniff; | |
# Requires nginx >= 1.5.9 | |
ssl_session_tickets off; | |
# Requires nginx >= 1.3.7 | |
# ssl_stapling on; | |
# Requires nginx => 1.3.7 | |
# ssl_stapling_verify on; | |
resolver_timeout 5s; | |
server_name server.com; | |
root /var/www/pocket/public; | |
index index.php index.html index.htm; | |
access_log /var/log/nginx/server.com-access.log; | |
error_log /var/log/nginx/server.com-error.log; | |
location / { | |
try_files $uri $uri/ /index.php$is_args$args; | |
} | |
location ~ \.php$ { | |
try_files $uri =404; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_index index.php; | |
fastcgi_intercept_errors on; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
include /etc/nginx/fastcgi_params; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment