1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/dont-code_ynh.git synced 2024-09-03 18:26:34 +02:00
dont-code_ynh/conf/nginx.conf
2024-04-11 12:07:51 +02:00

61 lines
1.7 KiB
Nginx Configuration File

#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
# CORS support
more_set_headers 'Access-Control-Allow-Origin: *';
# Handling preflight requests
if ($request_method = OPTIONS) {
more_set_headers 'Access-Control-Allow-Methods: *' 'Access-Control-Allow-Headers: *';
}
# Path to source
alias __DATA_DIR__/;
index index.html;
location __PATH__/ide {
proxy_pass http://localhost:__PORT_IDE__/ide;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
location __PATH__/preview {
proxy_pass http://localhost:__PORT_PREVIEW__/preview;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
location __PATH__/project {
proxy_pass http://localhost:__PORT_PROJECT__/project;
proxy_set_header Host $host;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
location __PATH__/data {
proxy_pass http://localhost:__PORT_DATA__/data;
proxy_set_header Host $host;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
}
location __PATH__/documents {
proxy_pass http://localhost:__PORT_DATA__/documents;
proxy_set_header Host $host;
proxy_read_timeout 86400s;
proxy_send_timeout 86400s;
client_max_body_size 15M;
}
}