diff --git a/conf/nginx.share.conf b/conf/nginx.share.conf index f1b2616..109e1ce 100644 --- a/conf/nginx.share.conf +++ b/conf/nginx.share.conf @@ -8,7 +8,7 @@ location /upload/ { client_max_body_size 104857616; # 100MB + 16 bytes (see Prosody config) proxy_request_buffering off; proxy_http_version 1.1; - proxy_pass http://localhost:__PORT__; + proxy_pass http://localhost:__PORT_HTTP__; proxy_set_header Host $host; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto https; diff --git a/scripts/_common.sh b/scripts/_common.sh index 599a569..53ff914 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -27,12 +27,13 @@ install_certificates() { ### Add Nginx configuration for other domains. This is necessary because at the moment Snikket requires two additional ### subdomains to function fully. Does not reload Nginx configuration. -### Usage: add_extra_nginx_config +### Usage: add_extra_nginx_config add_extra_nginx_config() { - local extra_domain="$1" + local extra_subdomain="$1" + local extra_domain=$extra_subdomain.$domain local finalnginxconf="/etc/nginx/conf.d/$extra_domain.d/$app.conf" - ynh_add_config --template="nginx.$extra_domain.conf" --destination="$finalnginxconf" + ynh_add_config --template="nginx.$extra_subdomain.conf" --destination="$finalnginxconf" ynh_store_file_checksum --file="$finalnginxconf" } diff --git a/scripts/install b/scripts/install index 4405101..6daa15a 100755 --- a/scripts/install +++ b/scripts/install @@ -162,6 +162,8 @@ yunohost service add "$app" --description="Chat that is simple, secure, and priv ynh_add_systemd_config --service="$app-web" --template="web.service" yunohost service add "$app-web" --description="Chat that is simple, secure, and private" --log="/var/log/$app-web/$app-web.log" # Create a dedicated NGINX config using the conf/nginx.conf template +add_extra_nginx_config share +add_extra_nginx_config groups ynh_add_nginx_config #=================================================