NGINX & Wordpress 404 error on permalinks

Ziggy-NL

New member
Joined
May 7, 2020
Messages
7
Hello All, i'm trying to fix the 404 errors on permalinks.

When I add the following line : try_files $uri $uri/ /index.php?$uri&$args;
to the nginx.conf file in /usr/local/directadmin/data/users/username the problem is solved.

Is there a way to change this for all users/sites?
Because when i move new users to this server they als have the 404 on permalinks

edit: running directadmin on centos 8

thanks in advance
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
349
Location
UA
copy template from /usr/local/directadmin/data/templates/nginx_server* to /usr/local/directadmin/data/templates/custom/ and modify as you wish
then run rewrite confs
 

Ziggy-NL

New member
Joined
May 7, 2020
Messages
7
copy template from /usr/local/directadmin/data/templates/nginx_server* to /usr/local/directadmin/data/templates/custom/ and modify as you wish
then run rewrite confs
thanks i'm going to try this! Sounds good I was wondering wher this template was
 
Top