Created
July 18, 2024 07:19
-
-
Save Chigozie-Gerald/16021ffc05524f1aaf8521e2632b32e7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 443 ssl http2; | |
listen [::]:443 ssl http2; | |
server_name mycompany.broombookings.com; | |
# logging: Please add DirectAdmin root below | |
# logging: Please add DirectAdmin logging below | |
# api: Please add broombookings admin config here | |
location ~* ^/api/(.+)$ { | |
} | |
# nextjs files at specified port with process managed by pm2 | |
location / { | |
proxy_pass http://127.0.0.1:6060; | |
proxy_http_version 1.1; | |
proxy_cache_bypass $http_upgrade; | |
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_set_header X-Forwarded-Host $host; | |
proxy_set_header X-Forwarded-Port $server_port; | |
} | |
} | |
# HTTP redirect | |
server { | |
listen 80; | |
listen [::]:80; | |
server_name .mycompany.broombookings.com; | |
location / { | |
return 301 https://mycompany.broombookings.com$request_uri; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment