Last active
April 8, 2017 06:22
-
-
Save iflamed/ef1979f78981a638c1ffcc0d2b1fa58c to your computer and use it in GitHub Desktop.
The letsencrypt nginx config and issue shell script
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
server { | |
listen 443 http2 ssl; | |
server_name example.com www.example.com; | |
ssl_certificate /home/user/.acme.sh/example.com_ecc/fullchain.cer; | |
ssl_certificate_key /home/user/.acme.sh/example.com_ecc/example.com.key; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS'; | |
ssl_prefer_server_ciphers on; | |
ssl_dhparam /etc/nginx/ssl/dhparams.pem; | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | |
add_header Strict-Transport-Security "max-age=63072000; preload"; | |
#charset koi8-r; | |
#access_log /var/log/nginx/log/host.access.log main; | |
root /www/sites/example/public/; | |
index index.php; | |
location /.well-known/acme-challenge/ { | |
alias /var/www/letsencrypt/.well-known/acme-challenge/; | |
try_files $uri =404; | |
} | |
location / { | |
try_files $uri $uri/ /index.php?$query_string; | |
} | |
location ~ \.php$ { | |
fastcgi_split_path_info ^(.+\.php)(/.+)$; | |
fastcgi_pass 127.0.0.1:9000; | |
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | |
fastcgi_index index.php; | |
include fastcgi_params; | |
} | |
} |
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
acme.sh --issue -w /var/www/letsencrypt/ -d example.com --keylength ec-256 | |
acme.sh --installcert -d example.com --reloadcmd "sudo service nginx force-reload" --ecc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment