mirror of
https://github.com/YunoHost-Apps/calibreweb_ynh.git
synced 2024-09-03 18:16:20 +02:00
Root directory not allowed in nginx.conf
This commit is contained in:
parent
27afc5af7a
commit
3cc095adc1
3 changed files with 11 additions and 2 deletions
|
@ -65,3 +65,6 @@ sudo yunohost app upgrade calibreweb -u https://github.com/Yunohost-Apps/calibre
|
|||
## Todo
|
||||
- [ ] Multiinstance
|
||||
- [ ] Better Multimedia integration
|
||||
|
||||
## License
|
||||
Package and software are GPL 3.0
|
||||
|
|
|
@ -4,8 +4,8 @@ location __PATH__ {
|
|||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_pass http://localhost:__PORT__;
|
||||
proxy_set_header X-Forwarded-For $remote_addr;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Scheme $scheme;
|
||||
|
|
|
@ -97,6 +97,12 @@ pip install --target $final_path/vendor -r $final_path/requirements.txt
|
|||
#=================================================
|
||||
# NGINX CONFIGURATION
|
||||
#=================================================
|
||||
#Cannot use empty string for X-script-name
|
||||
if [ $path_url = "/" ] ; then
|
||||
ynh_replace_string " proxy_set_header X-Script-Name __PATH__;"
|
||||
" proxy_set_header X-Script-Name /$app;"
|
||||
../conf/nginx.conf
|
||||
fi
|
||||
|
||||
# Create a dedicated nginx config
|
||||
ynh_add_nginx_config
|
||||
|
|
Loading…
Add table
Reference in a new issue