generated from fahricansecer/boilerplate-be
Initial commit
This commit is contained in:
32
skriptai.conf
Normal file
32
skriptai.conf
Normal file
@@ -0,0 +1,32 @@
|
||||
upstream skriptai_backend {
|
||||
server 127.0.0.1:3000;
|
||||
}
|
||||
|
||||
upstream skriptai_frontend {
|
||||
server 127.0.0.1:3001;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name skript.bilgich.com 192.168.1.199;
|
||||
|
||||
# Frontend (Root)
|
||||
location / {
|
||||
proxy_pass http://skriptai_frontend;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
# Backend API
|
||||
location /api {
|
||||
proxy_pass http://skriptai_backend;
|
||||
proxy_http_version 1.1;
|
||||
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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user