diff --git a/doc/Admin.md b/doc/Admin.md index a710f17..2babc24 100644 --- a/doc/Admin.md +++ b/doc/Admin.md @@ -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 [] 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. diff --git a/scripts/install b/scripts/install index 0ed4ee2..0e9c81d 100755 --- a/scripts/install +++ b/scripts/install @@ -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