mirror of
https://github.com/YunoHost-Apps/sogo_ynh.git
synced 2024-09-03 20:26:07 +02:00
Update nginx config from upstream
This commit is contained in:
parent
fb62507a0e
commit
bca4264336
2 changed files with 43 additions and 11 deletions
|
@ -1,8 +1,9 @@
|
|||
# SOGo Proxying
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location ^~ __PATH__/ {
|
||||
location ^~/SOGo/
|
||||
{
|
||||
proxy_pass http://127.0.0.1:__PORT__;
|
||||
proxy_redirect http://127.0.0.1:__PORT__/SOGo/ /SOGo;
|
||||
proxy_redirect http://127.0.0.1:__PORT__ default;
|
||||
# forward user's IP address
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
|
@ -11,17 +12,39 @@ location ^~ __PATH__/ {
|
|||
proxy_set_header x-webobjects-remote-host 127.0.0.1;
|
||||
proxy_set_header x-webobjects-server-name $server_name;
|
||||
proxy_set_header x-webobjects-server-url $scheme://$host;
|
||||
proxy_set_header x-webobjects-server-port $server_port;
|
||||
proxy_connect_timeout 90;
|
||||
proxy_send_timeout 90;
|
||||
proxy_read_timeout 90;
|
||||
proxy_buffer_size 8k;
|
||||
proxy_buffers 4 64k;
|
||||
proxy_busy_buffers_size 64k;
|
||||
proxy_temp_file_write_size 64k;
|
||||
break;
|
||||
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
|
||||
client_max_body_size 100M;
|
||||
}
|
||||
|
||||
location __PATH__.woa/WebServerResources/ {
|
||||
location /SOGo.woa/WebServerResources/
|
||||
{
|
||||
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
||||
allow all;
|
||||
expires max;
|
||||
}
|
||||
location __PATH__/WebServerResources/ {
|
||||
location /SOGo/WebServerResources/
|
||||
{
|
||||
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
|
||||
allow all;
|
||||
expires max;
|
||||
}
|
||||
location ^__PATH__/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
|
||||
location (^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$)/
|
||||
{
|
||||
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
|
||||
expires max;
|
||||
}
|
||||
location (^/SOGo/so/ControlPanel/Products/[^/]*UI/Resources/.*\.(jpg|png|gif|css|js)$)/
|
||||
{
|
||||
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;
|
||||
expires max;
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
#=================================================
|
||||
|
||||
config_nginx() {
|
||||
nginx_config="/etc/nginx/conf.d/$domain/$app.conf"
|
||||
nginx_config="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
# shellcheck disable=SC2016
|
||||
principals_block='
|
||||
|
@ -21,19 +21,28 @@ location = /principals/ {
|
|||
# shellcheck disable=SC2016
|
||||
activesync_block='
|
||||
# For ActiveSync
|
||||
location /Microsoft-Server-ActiveSync/ {
|
||||
proxy_pass http://127.0.0.1:__PORT__/SOGo/Microsoft-Server-ActiveSync/;
|
||||
location ^~ /Microsoft-Server-ActiveSync {
|
||||
proxy_connect_timeout 75;
|
||||
proxy_send_timeout 3600;
|
||||
proxy_read_timeout 3600;
|
||||
proxy_buffers 64 256k;
|
||||
|
||||
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_pass http://127.0.0.1:'$port'/SOGo/Microsoft-Server-ActiveSync;
|
||||
}'
|
||||
# shellcheck disable=SC2016
|
||||
caldav_block='
|
||||
# For Caldav
|
||||
location /.well-known/caldav {
|
||||
location = /.well-known/caldav {
|
||||
rewrite ^ https://$server_name/SOGo/dav/;
|
||||
}'
|
||||
# shellcheck disable=SC2016
|
||||
carddav_block='
|
||||
# For Carddav
|
||||
location /.well-known/carddav {
|
||||
location = /.well-known/carddav {
|
||||
rewrite ^ https://$server_name/SOGo/dav/;
|
||||
}'
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue