This commit is contained in:
Your Name committed 2026-07-12 06:35:19 -04:00
1 parent 55f7be7307
commit 537b6d3bca
6 files changed
+287 -6

No files matched your search

@@ -0,0 +1,31 @@
server {
listen 80;
server_name admin.pkh.kitizone.com;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name admin.pkh.kitizone.com;
ssl_certificate /etc/letsencrypt/live/admin.pkh.kitizone.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/admin.pkh.kitizone.com/privkey.pem;
location / {
root /usr/share/nginx/html/pkh/admin;
index index.html index.htm;
try_files $uri $uri/ /index.html;
}
# Caching for static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires max;
log_not_found off;
}
}
@@ -0,0 +1,31 @@
server {
listen 80;
server_name api.pkh.kitizone.com;
location ~ /.well-known/acme-challenge {
allow all;
root /var/www/certbot;
}
location / { return 301 https://$host$request_uri; }
}
server {
listen 443 ssl;
server_name api.pkh.kitizone.com;
client_max_body_size 20m;
ssl_certificate /etc/letsencrypt/live/api.pkh.kitizone.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/api.pkh.kitizone.com/privkey.pem;
location / {
proxy_pass http://192.168.1.167:3052;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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;
}
}
@@ -0,0 +1,40 @@
server {
listen 80;
server_name pkh.kitizone.com;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name pkh.kitizone.com;
ssl_certificate /etc/letsencrypt/live/pkh.kitizone.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/pkh.kitizone.com/privkey.pem;
# Next.js SSR
location / {
proxy_pass http://192.168.1.167:3003;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
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_cache_bypass $http_upgrade;
}
# Next.js static assets caching
location /_next/static/ {
proxy_pass http://192.168.1.167:3003;
proxy_http_version 1.1;
proxy_set_header Host $host;
add_header Cache-Control "public, max-age=31536000, immutable";
}
}
@@ -0,0 +1,32 @@
server {
listen 80;
server_name spa.pkh.kitizone.com;
location /.well-known/acme-challenge/ {
root /var/www/certbot;
}
location / {
return 301 https://$host$request_uri;
}
}
server {
listen 443 ssl;
server_name spa.pkh.kitizone.com;
ssl_certificate /etc/letsencrypt/live/spa.pkh.kitizone.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/spa.pkh.kitizone.com/privkey.pem;
root /usr/share/nginx/html/pkh/spa;
index index.html index.htm;
location / {
try_files $uri $uri/ /index.html;
}
# Caching for static assets
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {
expires max;
log_not_found off;
}
}