With the Synology DSM6 update, we have now to use Nginx instead of Apache. By default Nginx configuration don’t allow wordpress permalinks (generate 404).
I read the idea was to transform the /uri in /?p=$uri and put this configuration in the “location” section of the server nginx config.
Where to put this configuration in DSM6 exactly ?
Have you tried the user config? Just copy your working:
to:
and rename the
server.webstation-vhost.conf
toserver.webstation-vhost.conf.old
or something and restart nginx (nginx -s reload
)Or better yet, remove your virtual host(s) from webstation. Only thing is you need to manually update your SSL certs when they expire instead of using the web interface.
Actually, you can add custom directives easily, without modifying the DSM behavior.
Take a look at the content of
/usr/local/etc/nginx/sites-enabled/httpd-vhost.conf-user
, to see where the custom configuration has to be stored:Then, you just have to create the file
/usr/local/etc/nginx/conf.d/778943ad-0dc4-40ae-bb7f-7b2285e3203b/user.conf.wordpress-permalink
with the following content:and restart nginx:
It will not break the future DSM update (since it is a supported customization)