1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/calibreweb_ynh.git synced 2024-09-03 18:16:20 +02:00

New nginx conf

systemd
This commit is contained in:
Krakinou 2018-12-09 17:35:37 +01:00
parent 3a9b6dfeb0
commit b9e5a41afc
3 changed files with 10 additions and 5 deletions

View file

@ -4,8 +4,13 @@ location __PATH__ {
if ($scheme = http) { if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
proxy_pass http://localhost:__PORT__; proxy_pass http://localhost:__PORT__;
proxy_set_header X-Forwarded-For $remote_addr; 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;
proxy_set_header X-Script-Name __PATH__;
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Small description of the service Description=calibreweb
After=network.target After=network.target
[Service] [Service]
@ -7,7 +7,7 @@ Type=simple
User=__APP__ User=__APP__
Group=__APP__ Group=__APP__
WorkingDirectory=__FINALPATH__/ WorkingDirectory=__FINALPATH__/
ExecStart=__FINALPATH__/script >> /var/log/__APP__/__APP__.log 2>&1 ExecStart=/usr/bin/python __FINALPATH__/script >> /var/log/__APP__/__APP__.log 2>&1
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View file

@ -139,7 +139,7 @@ ynh_system_user_create $app
### - And the section "SETUP SYSTEMD" in the upgrade script ### - And the section "SETUP SYSTEMD" in the upgrade script
# Create a dedicated systemd config # Create a dedicated systemd config
#ynh_add_systemd_config ynh_add_systemd_config
#================================================= #=================================================