60 lines
2.3 KiB
Nginx Configuration File
60 lines
2.3 KiB
Nginx Configuration File
# ==============================================================================
|
|||
|
|
# COSMOS WORKSTATION - NGINX REVERSE PROXY CONFIGURATION
|
||
|
|
# Replace "yourdomain.com" with your public domain, dynamic DNS, or local IP
|
||
|
|
# ==============================================================================
|
||
|
|
|
||
|
|
# Rate Limiting Zones
|
||
|
|
limit_req_zone $binary_remote_addr zone=cosmos_limit:10m rate=30r/s;
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 80;
|
||
|
|
server_name yourdomain.com *.yourdomain.com;
|
||
|
|
|
||
|
|
# Redirect HTTP to HTTPS
|
||
|
|
return 301 https://$host$request_uri;
|
||
|
|
}
|
||
|
|
|
||
|
|
server {
|
||
|
|
listen 443 ssl http2;
|
||
|
|
server_name yourdomain.com;
|
||
|
|
|
||
|
|
# SSL Certificate Paths (e.g. from Let's Encrypt / Certbot)
|
||
|
|
ssl_certificate /etc/letsencrypt/live/yourdomain.com/fullchain.pem;
|
||
|
|
ssl_certificate_key /etc/letsencrypt/live/yourdomain.com/privkey.pem;
|
||
|
|
|
||
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
||
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
||
|
|
|
||
|
|
client_max_body_size 500M;
|
||
|
|
|
||
|
|
# ─── Cosmos Unified Portal & S3 Console ───────────────────────────────────
|
||
|
|
location / {
|
||
|
|
limit_req zone=cosmos_limit burst=50 nodelay;
|
||
|
|
proxy_pass http://127.0.0.1:8080;
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
|
||
|
|
# ─── Gitea Git Interface ──────────────────────────────────────────────────
|
||
|
|
location /source/ {
|
||
|
|
proxy_pass http://127.0.0.1:3000/;
|
||
|
|
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;
|
||
|
|
}
|
||
|
|
|
||
|
|
# ─── MinIO S3 API Endpoint ────────────────────────────────────────────────
|
||
|
|
location /s3/ {
|
||
|
|
proxy_pass http://127.0.0.1:9000/;
|
||
|
|
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_buffering off;
|
||
|
|
proxy_request_buffering off;
|
||
|
|
}
|
||
|
|
}
|