diff --git a/conf/nginx.conf b/conf/nginx.conf index c5785d7..c950e8d 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,5 +1,5 @@ # SOGo Proxying - location ^~ /SOGo { + location ^~ /VARPATH { proxy_pass http://127.0.0.1:20000; proxy_redirect http://127.0.0.1:20000/SOGo/ /SOGo; # forward user's IP address @@ -12,9 +12,6 @@ proxy_set_header x-webobjects-server-url $scheme://$host; include conf.d/yunohost_panel.conf.inc; } - # SOGo - location ~ ^/sogo { rewrite ^ https://$host/SOGo; } - location ~ ^/SOGO { rewrite ^ https://$host/SOGo; } # For IOS 7 location = /principals/ { @@ -23,13 +20,13 @@ } - location /SOGo.woa/WebServerResources/ { + location /VARPATH.woa/WebServerResources/ { alias /usr/lib/GNUstep/SOGo/WebServerResources/; } - location /SOGo/WebServerResources/ { + location /VARPATH/WebServerResources/ { alias /usr/lib/GNUstep/SOGo/WebServerResources/; } - location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ { + location ^/VARPATH/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ { alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2; } diff --git a/scripts/install b/scripts/install index 45ef1dc..5a40237 100755 --- a/scripts/install +++ b/scripts/install @@ -49,6 +49,9 @@ sudo sed -i "s@DBPASS@$db_pwd@g" ../conf/sogo.conf #Copy SOGo config sudo cp ../conf/sogo.conf /etc/sogo/sogo.conf +#Configure Nginx +sudo sed -i "s@VARPATH@$path@g" ../conf/nginx.conf + #copy Nginx config sudo cp ../conf/nginx.conf /etc/nginx/conf.d/$domain.d/$app.conf