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

Merge pull request #8 from dkoukoul/master

Fix issue with ssowat
This commit is contained in:
Dimitris 2024-01-03 15:00:29 +02:00 committed by GitHub
commit 6e42c26d6f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 24 deletions

View file

@ -1,27 +1,7 @@
# Setup your website on cjdns network
1. In the Applications menu, search for "cjdns" and install it.
2. Obtain your cjdns IPv6 address by navigating to Tools -> Logs -> Click on "Install the 'cjdns' app." Your IPv6 address should be displayed in the log.
3. Reboot your YunoHost server to make the tun device available. Navigate to Tools->Shutdown and click Reboot.
4. Navigate to Tools -> Yunohost Settings -> Security, and under NGINX, disable "Force HTTPS." Click Save to apply the changes.
5. Edit `/etc/nginx/conf.d/[your-domain].conf`, add your cjdns-ipv6 to the list of `server_name`.
6. Finally, to allow public access for cjdns requests to your new wordpress site you can do the following:
1. SSH into your yunoHost server
2. Copy current sso configuration file to persistent: `cp /etc/ssowat/conf.json /etc/ssowat/conf.json.persistent`
3. Then edit the persistent file: `nano /etc/ssowat/conf.json.persistent`
4. Change `public` to `true` and add this line under the `wordpress.main uris` section: `"re:^.fc.*"`. Remember to add a trailing “,” to the above entry. For example:
```json
"wordpress.main": {
"auth_header": true,
"label": "WordPress",
"public": true,
"show_tile": true,
"uris": [
"example.nohost.me/blog",
"re:^.fc.*"
],
"use_remote_user_var_in_nginx_conf": false,
"users": []
}
``````
2. Copy your cjdns ipv6 that is shown when installation completes.
3. Navigate to Tools -> Yunohost Settings -> Security, and under NGINX, disable "Force HTTPS." Click Save to apply the changes.
5. Edit `/etc/nginx/conf.d/[your-domain].conf`, add your cjdns-ipv6 to the list of `server_name` inside square brackets [<cjdns-ipv6>] and make sure to remove any leading 0 from the address sections.
6. Finally, restart nginx and you should be able now to access your wordpress site on the cjdns network.

View file

@ -96,6 +96,11 @@ ynh_script_progression --message="Launching cjdns service..." --weight=1
# Start a systemd service
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
#=================================================
# MAKE WORDPRESS AVAILABLE ON CJDNS
#=================================================
yunohost tools shell -c "from yunohost.permission import permission_url; permission_url('wordpress.main', add_url=['re:^.fc.*'])"
#=================================================
# END OF SCRIPT