partial update create nginx proxy https
This commit is contained in:
@@ -42,8 +42,8 @@ http {
|
||||
limit_req_zone $binary_remote_addr zone=api:10m rate=60r/m;
|
||||
|
||||
# Upstream to Laravel app
|
||||
upstream app {
|
||||
server app:80;
|
||||
upstream ckb-app {
|
||||
server ckb-app:80;
|
||||
}
|
||||
|
||||
# HTTP server configuration
|
||||
@@ -51,14 +51,9 @@ http {
|
||||
listen 80;
|
||||
server_name bengkel.digitaloasis.xyz www.bengkel.digitaloasis.xyz localhost _;
|
||||
|
||||
# Let's Encrypt challenge
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /var/www/certbot;
|
||||
}
|
||||
|
||||
# Handle static files with proper headers
|
||||
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot|otf)$ {
|
||||
proxy_pass http://app;
|
||||
proxy_pass http://ckb-app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -79,7 +74,7 @@ http {
|
||||
|
||||
# Handle Laravel Mix versioned assets
|
||||
location ~* \.(css|js)\?id=[a-zA-Z0-9]+ {
|
||||
proxy_pass http://app;
|
||||
proxy_pass http://ckb-app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -101,7 +96,7 @@ http {
|
||||
# Rate limiting for login endpoints
|
||||
location ~ ^/(login|register|password) {
|
||||
limit_req zone=login burst=5 nodelay;
|
||||
proxy_pass http://app;
|
||||
proxy_pass http://ckb-app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -116,7 +111,7 @@ http {
|
||||
# Rate limiting for API endpoints
|
||||
location /api/ {
|
||||
limit_req zone=api burst=20 nodelay;
|
||||
proxy_pass http://app;
|
||||
proxy_pass http://ckb-app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
@@ -131,16 +126,16 @@ http {
|
||||
# Health check endpoint
|
||||
location /health {
|
||||
access_log off;
|
||||
proxy_pass http://app;
|
||||
proxy_pass http://ckb-app;
|
||||
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;
|
||||
}
|
||||
|
||||
# Main application for HTTP (catch-all)
|
||||
# Main application (catch-all)
|
||||
location / {
|
||||
proxy_pass http://app;
|
||||
proxy_pass http://ckb-app;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
||||
Reference in New Issue
Block a user