mirror of
https://github.com/YunoHost-Apps/converse_ynh.git
synced 2024-09-03 18:25:53 +02:00
Update nginx.conf
This commit is contained in:
parent
b3f051a5aa
commit
6b92394f09
1 changed files with 18 additions and 71 deletions
|
@ -2,85 +2,32 @@
|
|||
location __PATH__/ {
|
||||
|
||||
# Path to source
|
||||
alias __INSTALL_DIR__/;
|
||||
index index.html;
|
||||
alias __FINALPATH__/;
|
||||
|
||||
# XMPP BOSH
|
||||
location __PATH__/http-bind {
|
||||
proxy_pass https://localhost:5281/http-bind;
|
||||
index index.html;
|
||||
|
||||
# BOSH
|
||||
location = __PATH__/http-bind {
|
||||
proxy_pass "http://localhost:5290/http-bind";
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host localhost;
|
||||
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_buffering off;
|
||||
tcp_nodelay on;
|
||||
}
|
||||
|
||||
# XMPP HTTP-Upload
|
||||
location __PATH__/upload {
|
||||
proxy_pass https://f.localhost; proxy_http_version 1.1;
|
||||
proxy_set_header Host localhost;
|
||||
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-For $remote_addr;
|
||||
proxy_buffering off;
|
||||
tcp_nodelay on;
|
||||
}
|
||||
|
||||
# XMPP Websockets
|
||||
location __PATH__/xmpp-websocket {
|
||||
proxy_pass http://localhost:5280/xmpp-websocket;
|
||||
proxy_http_version 1.1;
|
||||
proxy_buffering off;
|
||||
proxy_set_header Connection "Upgrade";
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_read_timeout 900s;
|
||||
}
|
||||
|
||||
# XMPP Account invite
|
||||
location __PATH__/invite {
|
||||
proxy_pass https://localhost:5281/invite;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host localhost;
|
||||
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-For $remote_addr;
|
||||
proxy_buffering off;
|
||||
tcp_nodelay on;
|
||||
tcp_nodelay on;
|
||||
}
|
||||
|
||||
# XMPP account register
|
||||
location __PATH__/register {
|
||||
proxy_pass https://localhost:5281/register;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Host localhost;
|
||||
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-For $remote_addr;
|
||||
proxy_buffering off;
|
||||
tcp_nodelay on;
|
||||
# CORS
|
||||
location ~ .(ttf|ttc|otf|eot|woff|woff2|font.css|css|js)$ {
|
||||
more_set_headers "Access-Control-Allow-Origin: *";
|
||||
#more_set_headers "Access-Control-Max-Age: 3600";
|
||||
#more_set_headers "Access-Control-Expose-Headers: Content-Length";
|
||||
#more_set_headers "Access-Control-Allow-Headers: Range";
|
||||
#more_set_headers "Accept-Ranges: bytes";
|
||||
alias __FINALPATH__/dist/;
|
||||
}
|
||||
|
||||
# sur mon vps debian j'ai eu besoin de ça pour
|
||||
# que les pages d'invitation soit bien
|
||||
# formatées
|
||||
#location = /share/bootstrap4/css/bootstrap.min.css {
|
||||
# alias /usr/lib/nodejs/bootstrap/dist/css/bootstrap.min.css;
|
||||
#}
|
||||
|
||||
#location = /share/jquery/jquery.min.js {
|
||||
# alias /usr/lib/nodejs/jquery/dist/jquery.min.js;
|
||||
#}
|
||||
|
||||
#location = /share/bootstrap4/js/bootstrap.min.js {
|
||||
# alias /usr/lib/nodejs/bootstrap/dist/js/bootstrap.min.js;
|
||||
#}
|
||||
|
||||
}
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue