Skip to content

Instantly share code, notes, and snippets.

@searsia
Created January 6, 2018 09:08
Show Gist options
  • Save searsia/a79954118869ae77bb5ee588ef4a685c to your computer and use it in GitHub Desktop.
Save searsia/a79954118869ae77bb5ee588ef4a685c to your computer and use it in GitHub Desktop.
Nginx example configuration (/etc/nginx/sites-available/yourdomain)
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name yourdomain.top www.yourdomain.top;
location /.well-known/ {
allow all;
}
location / {
rewrite ^(.*) https://yourdomain.top$1 permanent;
}
}
server {
listen 443 ssl;
listen [::]:443 ipv6only=on ssl;
server_name yourdomain.top;
ssl_certificate /etc/letsencrypt/live/yourdomain.top/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain.top/privkey.pem;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers HIGH:!aNULL:!MD5;
root /var/www/html;
location / {
error_page 404 =404 /404.html;
}
location /searsia/ {
proxy_pass http://localhost:16842/searsia/;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment