Add Nginx config files

master
Noah Williams 2 years ago
parent 3ef3077427
commit e1718b335d
  1. 25
      nginx/nginx.conf
  2. 25
      nginx/sites-enabled/codeserver.conf

@ -0,0 +1,25 @@
user www-data;
worker_processes auto;
pid /var/run/nginx.pid;
events {
worker_connections 1024;
}
http {
gzip on;
gzip_proxied expired no-cache no-store private auth;
gzip_types text/plain text/css application/json application/javascript text/xml application/xml
application/xml+rss text/javascript image/svg+xml application/vnd.ms-fontobject
application/x-woff;
# Use webp where supported
map $http_accept $webp_suffix {
default "";
"~*webp" ".webp";
}
include /etc/nginx/sites-enabled/*;
client_max_body_size 10M;
}

@ -0,0 +1,25 @@
server {
listen 80;
server_name dev.domain.tld;
return 301 https://$server_name$request_uri;
}
server {
add_header Strict-Transport-Security "max-age=63072000; preload";
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name dev.domain.tld;
ssl_certificate /etc/letsencrypt/live/dev.domain.tld/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/dev.domain.tld/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://code-server:8443;
}
}
Loading…
Cancel
Save