mirror of
https://github.com/YunoHost-Apps/kiwiirc_ynh.git
synced 2024-09-03 19:35:59 +02:00
Fix
This commit is contained in:
parent
f8bc5e34a4
commit
73173b86ad
3 changed files with 26 additions and 34 deletions
|
@ -1,15 +1,21 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
location / {
|
||||||
location __PATH__/ {
|
index index.html;
|
||||||
|
root /usr/share/kiwiirc/;
|
||||||
proxy_set_header Host $host;
|
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
|
||||||
proxy_set_header x-forwarded-for $remote_addr;
|
|
||||||
|
|
||||||
proxy_pass http://127.0.0.1:__PORT__/kiwi/;
|
|
||||||
proxy_redirect default;
|
|
||||||
|
|
||||||
# Websocket support (from version 1.4)
|
|
||||||
proxy_http_version 1.1;
|
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
|
||||||
proxy_set_header Connection "upgrade";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
location /webirc/ {
|
||||||
|
# Forward incoming requests to local webircgateway socket
|
||||||
|
proxy_pass http://127.0.0.1:__PORT__/webirc/;
|
||||||
|
|
||||||
|
# Set http version and headers
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
|
# Add X-Forwarded-* headers
|
||||||
|
proxy_set_header X-Forwarded-Host $host;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
proxy_set_header X-Forwarded-For $remote_addr;
|
||||||
|
|
||||||
|
# Allow upgrades to websockets
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
}
|
|
@ -1,14 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=Websocket gateway to IRC networks
|
|
||||||
Documentation=https://github.com/kiwiirc/webircgateway
|
|
||||||
After=network.target
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
User=__APP__
|
|
||||||
Group=__APP__
|
|
||||||
ExecStart=/var/www/webircgateway/kiwiirc --config=/var/www/webircgateway/config.conf
|
|
||||||
ExecReload=/usr/bin/kill -USR1 $MAINPID
|
|
||||||
LimitNOFILE=1048576
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
|
@ -31,11 +31,11 @@ app=$YNH_APP_INSTANCE_NAME
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||||
|
|
||||||
final_path=/var/www/$app
|
# final_path=/var/www/$app
|
||||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
# test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||||
|
|
||||||
# Register (book) web path
|
# # Register (book) web path
|
||||||
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
# ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STORE SETTINGS FROM MANIFEST
|
# STORE SETTINGS FROM MANIFEST
|
||||||
|
@ -108,10 +108,10 @@ ynh_add_nginx_config
|
||||||
#=================================================
|
#=================================================
|
||||||
# SETUP SYSTEMD
|
# SETUP SYSTEMD
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
#ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
#ynh_add_systemd_config
|
||||||
|
|
||||||
# #=================================================
|
# #=================================================
|
||||||
# # MODIFY A CONFIG FILE
|
# # MODIFY A CONFIG FILE
|
||||||
|
|
Loading…
Reference in a new issue