feat: initial project setup
This commit is contained in:
66
vps/nginx/carlospalanca.conf
Normal file
66
vps/nginx/carlospalanca.conf
Normal file
@@ -0,0 +1,66 @@
|
||||
# Redirect HTTP to HTTPS
|
||||
server {
|
||||
listen 80;
|
||||
server_name carlospalanca.es www.carlospalanca.es;
|
||||
return 301 https://carlospalanca.es$request_uri;
|
||||
}
|
||||
|
||||
# Website
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name carlospalanca.es www.carlospalanca.es;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/carlospalanca.es/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/carlospalanca.es/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
root /var/www/carlospalanca.es;
|
||||
index index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ $uri.html =404;
|
||||
}
|
||||
|
||||
gzip on;
|
||||
gzip_types text/plain text/css application/json application/javascript text/xml application/xml;
|
||||
gzip_min_length 1000;
|
||||
|
||||
# Cache static assets
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|svg|ico|woff|woff2)$ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
}
|
||||
|
||||
# OpenWebUI
|
||||
server {
|
||||
listen 80;
|
||||
server_name ai.carlospalanca.es;
|
||||
return 301 https://ai.carlospalanca.es$request_uri;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
server_name ai.carlospalanca.es;
|
||||
|
||||
ssl_certificate /etc/letsencrypt/live/ai.carlospalanca.es/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/ai.carlospalanca.es/privkey.pem;
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
|
||||
client_max_body_size 50M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 300s;
|
||||
proxy_send_timeout 300s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user