Skip to content

Instantly share code, notes, and snippets.

@mattiasghodsian
Created December 21, 2023 00:23
Show Gist options
  • Save mattiasghodsian/2b7a8e624dd9f8c42de5fea434194644 to your computer and use it in GitHub Desktop.
Save mattiasghodsian/2b7a8e624dd9f8c42de5fea434194644 to your computer and use it in GitHub Desktop.
[Nginx] Configuration for Vue.Js (compiled)
# Author: Mattias Ghodsian
# Donate Eth: 0xBBB96204E45D11C9799c6B12E6eE6F0d4A071Ef5
# Donate coffee: https://www.buymeacoffee.com/mattiasghodsian
server {
listen 80;
server_name site.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name site.com;
ssl_certificate /etc/letsencrypt/live/site.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/site.com/privkey.pem;
#auth_basic "Restricted Content";
#auth_basic_user_file /etc/nginx/.htpasswd;
root /srv/frontend;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment