Last active
February 15, 2017 12:01
-
-
Save yellow1912/bf38b2993032d10b7a7bdc82167a948b 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
----------------------------- | |
NGINX setup | |
built by gcc 5.4.0 20160609 (Ubuntu 5.4.0-6ubuntu1~16.04.2) | |
built with OpenSSL 1.0.2h 3 May 2016 | |
TLS SNI support enabled | |
configure arguments: --with-cc-opt='-g -O2 -fPIE -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2' --with-ld-opt='-Wl,-Bsymbolic-functions -fPIE -pie -Wl,-z,relro -Wl,-z,now' --prefix=/usr/share/nginx --conf-path=/etc/nginx/nginx.conf --http-log-path=/var/log/nginx/access.log --error-log-path=/var/log/nginx/error.log --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --with-debug --with-pcre-jit --with-ipv6 --with-http_ssl_module --with-http_stub_status_module --with-http_realip_module --with-http_auth_request_module --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_v2_module --with-http_sub_module --with-http_xslt_module --with-stream --with-stream_ssl_module --with-mail --with-mail_ssl_module --with-threads --add-module=/etc/nginx/modules/ngx_devel_kit --add-module=/etc/nginx/modules/lua-nginx-module --add-module=/etc/nginx/modules/nginx-push-stream-module --sbin-path=/usr/sbin/nginx | |
----------------------------- | |
NGINX config | |
server { | |
listen 80; | |
listen 443 ssl; | |
server_name mysite.com www.mysite.com; | |
# tried both with and without ssl on | |
# ssl on; | |
ssl_certificate /etc/letsencrypt/live/mysite.com/fullchain.pem; | |
ssl_certificate_key /etc/letsencrypt/live/mysite.com/privkey.pem; | |
# from https://cipherli.st/ | |
# and https://raymii.org/s/tutorials/Strong_SSL_Security_On_nginx.html | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_prefer_server_ciphers on; | |
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH"; | |
ssl_ecdh_curve secp384r1; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_tickets off; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
resolver 8.8.8.8 8.8.4.4 valid=300s; | |
resolver_timeout 5s; | |
# Disable preloading HSTS for now. You can use the commented out header line that includes | |
# the "preload" directive if you understand the implications. | |
#add_header Strict-Transport-Security "max-age=63072000; includeSubdomains; preload"; | |
add_header Strict-Transport-Security "max-age=63072000; includeSubdomains"; | |
add_header X-Frame-Options SAMEORIGIN; | |
add_header X-Content-Type-Options nosniff; | |
ssl_dhparam /etc/ssl/certs/dhparam.pem; | |
root /var/www/web; | |
index app.php; | |
access_log /var/log/nginx/sites/1/b/f/1bfa3120d5534256b3bf17c37565c435/access.log; | |
error_log /var/log/nginx/sites/1/b/f/1bfa3120d5534256b3bf17c37565c435/error.log; | |
# some more code below not related to SSL | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment