1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kiwiirc_ynh.git synced 2024-09-03 19:35:59 +02:00
This commit is contained in:
ericgaspar 2022-02-03 19:18:24 +01:00
parent f8bc5e34a4
commit 73173b86ad
3 changed files with 26 additions and 34 deletions

View file

@ -1,15 +1,21 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__/ {
location / {
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;
location /webirc/ {
# Forward incoming requests to local webircgateway socket
proxy_pass http://127.0.0.1:__PORT__/webirc/;
proxy_pass http://127.0.0.1:__PORT__/kiwi/;
proxy_redirect default;
# Websocket support (from version 1.4)
# 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";
}

View file

@ -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

View file

@ -31,11 +31,11 @@ app=$YNH_APP_INSTANCE_NAME
#=================================================
ynh_script_progression --message="Validating installation parameters..." --weight=1
final_path=/var/www/$app
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# final_path=/var/www/$app
# test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
# Register (book) web path
ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
# # Register (book) web path
# ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
#=================================================
# STORE SETTINGS FROM MANIFEST
@ -108,10 +108,10 @@ ynh_add_nginx_config
#=================================================
# 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
ynh_add_systemd_config
#ynh_add_systemd_config
# #=================================================
# # MODIFY A CONFIG FILE