aboutsummaryrefslogtreecommitdiffhomepage
path: root/nginx.conf
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2024-07-27 19:02:32 +0900
committernsfisis <nsfisis@gmail.com>2024-07-27 19:02:32 +0900
commit7cbf34204233df7c7e9e4b24998e25dbd8d2a423 (patch)
tree848da44374c48edec603fb014c59ad0fbb9307e6 /nginx.conf
parent18308a22879dc9143a03bcbe53cf0c5e8e49ee1f (diff)
downloadphperkaigi-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.tar.gz
phperkaigi-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.tar.zst
phperkaigi-2025-albatross-7cbf34204233df7c7e9e4b24998e25dbd8d2a423.zip
organize dockerfiles and compose.yaml
Diffstat (limited to 'nginx.conf')
-rw-r--r--nginx.conf42
1 files changed, 42 insertions, 0 deletions
diff --git a/nginx.conf b/nginx.conf
new file mode 100644
index 0000000..cee5b5f
--- /dev/null
+++ b/nginx.conf
@@ -0,0 +1,42 @@
+events {
+ worker_connections 1024;
+}
+
+http {
+ # https://nginx.org/en/docs/http/websocket.html
+ map $http_upgrade $connection_upgrade {
+ default upgrade;
+ '' close;
+ }
+
+ server {
+ listen 80;
+
+ location /api/ {
+ proxy_pass http://api-server;
+ 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;
+ }
+
+ location /sock/ {
+ proxy_pass http://api-server;
+ proxy_http_version 1.1;
+ proxy_set_header Upgrade $http_upgrade;
+ proxy_set_header Connection $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;
+ }
+
+ location / {
+ proxy_pass http://app-server;
+ 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;
+ }
+ }
+}