directadmin/nginx wordpress compatibility

rpereyra

Verified User
Joined
Sep 8, 2013
Messages
42
Hello

I would like if wordpress is fully compatible with a DA/nginx only (without apache) install ?

Thanks

roberto
 
Yes, it is compatible if you don't use "Friendly URLs" feature :) If you'd like to use the feature, custom configuration should be added under DA admin level for the website.
 
wp

Multi-sites look to be easy to set-up too :) (credit: https://www.digitalocean.com/commun...multiple-wordpress-site-settings-with-nginx):
Code:
# Rewrite rules for WordPress Multi-site.
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
}

Hi,

Thanks by code, this code should work with all wordpress site of one account? if so, is necessary enable Permalink Settings in wp-admin?

example
http://mydomain.com/wp1
http://mydomain.com/wp2
http://mydomain.com/wp3
etc...

UPDATE
This code work well...

Rgds,
Eduardo
 
Last edited:
In order to user Wordpress with nginx, you need some directives for nginx, to read the query string:


location / {
try_files $uri $uri/ /index.php?$args ;
}



the code above is for a website installed in the rooth path.

If you install a website within a subfolder (remember softaculous usually suggest alway to install it in the /wp folder) you have to add directives for nginx which would be:


location /yoursubfolder {
try_files $uri $uri/ /yoursubfolder/index.php?$args ;
}


All of that should be added to the file (i don't remember well):
nginx_php.conf

Also it is advise to add chattr +i to prevent the configuration to be updated.
 
Back
Top