mirror of
https://github.com/demostf/proxy
synced 2026-06-03 12:04:07 +02:00
adjust to new frontend setup
This commit is contained in:
parent
82eb5fbe01
commit
0691b92a49
9 changed files with 135 additions and 34 deletions
36
sites/api.conf
Normal file
36
sites/api.conf
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name api.${HOST};
|
||||
ssl_certificate /etc/letsencrypt/live/demostffullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/demostf/privkey.pem;
|
||||
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
error_page 413 /413.html;
|
||||
|
||||
client_max_body_size 200m;
|
||||
|
||||
index index.php;
|
||||
|
||||
try_files $uri /index.php?$query_string /index.php;
|
||||
|
||||
set_real_ip_from 10.0.0.0/8;
|
||||
set_real_ip_from 172.16.0.0/12;
|
||||
set_real_ip_from 192.168.0.0/16;
|
||||
real_ip_header X-Forwarded-For;
|
||||
|
||||
location ~ ^(.+?\.php)(/.*)?$ {
|
||||
fastcgi_param PATH_INFO $2;
|
||||
fastcgi_pass ${API_FASTCGI};
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME /app/src/public/index.php;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location /upload {
|
||||
fastcgi_pass ${API_FASTCGI};
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /app/src/public/upload.php;
|
||||
}
|
||||
}
|
||||
39
sites/frontend.conf
Normal file
39
sites/frontend.conf
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name ${HOST};
|
||||
ssl_certificate /etc/letsencrypt/live/demostf/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/demostf/privkey.pem;
|
||||
|
||||
root /var/www;
|
||||
|
||||
error_page 413 /413.html;
|
||||
|
||||
client_max_body_size 150m;
|
||||
|
||||
location / {
|
||||
proxy_pass http://${FRONTEND};
|
||||
proxy_set_header Host ${HOST};
|
||||
proxy_connect_timeout 6000;
|
||||
proxy_send_timeout 12000;
|
||||
proxy_read_timeout 12000;
|
||||
send_timeout 12000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
client_max_body_size 150M;
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
}
|
||||
|
||||
if ($request_method = POST ) {
|
||||
rewrite /upload /do_upload last;
|
||||
break;
|
||||
}
|
||||
|
||||
location /do_upload {
|
||||
fastcgi_pass ${API_FASTCGI};
|
||||
fastcgi_index index.php;
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME /app/src/public/upload.php;
|
||||
}
|
||||
}
|
||||
15
sites/maps.conf
Normal file
15
sites/maps.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name maps.${HOST};
|
||||
ssl_certificate /etc/letsencrypt/live/demostffullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/demostf/privkey.pem;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
|
||||
location / {
|
||||
proxy_pass http://${MAPS};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
10
sites/static.conf
Normal file
10
sites/static.conf
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name static.${HOST};
|
||||
ssl_certificate /etc/letsencrypt/live/demostffullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/demostf/privkey.pem;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
|
||||
root /demos;
|
||||
}
|
||||
15
sites/sync.conf
Normal file
15
sites/sync.conf
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
server {
|
||||
listen 443 ssl;
|
||||
server_name sync.${HOST};
|
||||
ssl_certificate /etc/letsencrypt/live/demostffullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/demostf/privkey.pem;
|
||||
|
||||
add_header 'Access-Control-Allow-Origin' '*';
|
||||
|
||||
location / {
|
||||
proxy_pass http://${SYNC};
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue