Skip to content

Instantly share code, notes, and snippets.

@Neshable
Created January 8, 2019 13:13
Show Gist options
  • Save Neshable/6516c7f33b1d9ab01ce85e1f8da8eb3e to your computer and use it in GitHub Desktop.
Save Neshable/6516c7f33b1d9ab01ce85e1f8da8eb3e to your computer and use it in GitHub Desktop.
Nginx site available conf
server {
listen 80;
listen [::]:80;
server_name neshable.com www.neshable.com;
return 301 https://neshable.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name neshable.com;
ssl_certificate /etc/letsencrypt/live/www.neshable.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.neshable.com/privkey.pem;
include snippets/ssl-params.conf;
return 301 https://www.neshable.com$request_uri;
}
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name www.neshable.com;
root /var/www/neshable.com/htdocs;
ssl_certificate /etc/letsencrypt/live/www.neshable.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/www.neshable.com/privkey.pem;
include snippets/ssl-params.conf;
index index.php;
include snippets/nginx-virtual-host-snippet-gzip.conf;
include snippets/nginx-virtual-host-snippet-wordpress.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment