Hardware: Raspberry Pi 4 Model B YunoHost version: 4.0.8.3 (stable) behind Freebox mini 4K I have access to my server : Through SSH, through the webadmin
Description of my issue
Hi!
I’m trying to setup a worpdress install as a custom web app on my Yunohost server. I managed to install wordpress, migrate my content from a previous wordpress install on another server, and import all the content and config using wordpress duplicator plugin.
I first assigned the following URL to the custom app: https://mysite.fr/site (fake URL, I can provide the right one if needed), But I set it up afterwards to the root of the domain, https://mysite.fr. It’s also the URL in both wordpress settings (Wordpress URL and website’s URL).
Through the Yunohost graphic admin of the apps, “Modifier l’URL d’accès de cette application (domaine et/ou chemin)” (fr). Does it sound odd to do that?..
(NB : If i check the server through FTP, with the custom webapp credentials, the worpress files are at the root of the www folder.)
Not really but there are multiple ways to achieve similar result which may or may not lead to that issue In particular I’m guessing that you may have used the “Make this app the default one” considering the presence of ‘redirected_urls’ in conf.json.persistent
Yes, it’s in fact a ~bug of the “Make this app the default” I believe …
You can edit the file using your favourite tool, or also :
echo '{}' > /etc/ssowat/conf.json.persistent
(no need to restart anything for this to take effect except maybe force-clearing the browser cache with Ctrl+F5)
I found the issue: in Wordpress settings, the permalinks were set to custom to show “pretty” human readable URLs, and according to (1) NGINX seems to not support it. If I set the URLS to default (“simple”), it works again. However I’d like to keep the pretty URLs if I can…
The page in (1) suggests to modify nginx.conf to add the following lines to modify NGINX behavior:
Is it safe to do it in Yunohost context? I’m using the same Yunohost server to host my Nextcloud service and a couple of other apps. Won’t it break something? Since I’m using mapper.fr only for the Wordpress, and another domain for the rest of the apps, maybe there’s a way to limit the NGINX “location” directive or block to mapper.fr?
I hope my questions are clear. Once again, thank you very much for your time and help
I found out that there could be different conf files in /etc/nginx/conf.d, including one called mondomaine.fr.conf - that’s the domain associated with my Wordpress custom webapp. But there’s also a folder called mondomaine.fr.d, in which I found my_webapp.conf. Which file does what ? Don’t know yet.
I tried to update mondomaine.fr.conf with the location block and reload nginx but pretty URLs still don’t work.
The appropriate location block was already included in my_webapp.conf.