HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   nginx and Wordpress (http://www.howtoforge.com/forums/showthread.php?t=60398)

Rashef 1st February 2013 12:28

nginx and Wordpress
 
Hi guys,

I'm struggling to understand how to have my Wordpress instances working properly on NGINX with a ISPconfig3 head...

I found many different guides about how to modify NGINX for Wordpress, but I'd like to understand if I can avoid to modify the conf files and use only the ISPconfig3 interface.

This is my current conf in "nginx Directives":

Code:

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

      # Add trailing slash to */wp-admin requests.
      rewrite /wp-admin$ $scheme://$host$uri/ permanent;

      location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                expires max;
                log_not_found off;
      }
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

But I'm still not able to have Wordpress in a subfolder working with the root URL, anyone succeed on it?

falko 2nd February 2013 12:02

Quote:

Originally Posted by Rashef (Post 291410)
But I'm still not able to have Wordpress in a subfolder working with the root URL, anyone succeed on it?

Set up a new vhost and add a root directive that points to the correct folder:


Code:

location / {
      root /path/to/your/document/root;
      try_files $uri $uri/ /index.php?$args;

      # Add trailing slash to */wp-admin requests.
      rewrite /wp-admin$ $scheme://$host$uri/ permanent;

      location ~*  \.(jpg|jpeg|png|gif|css|js|ico)$ {
                expires max;
                log_not_found off;
      }
}


rlischer 3rd February 2013 02:23

Are you saying to paste the above code in "nginx Directives" of the site?

thanks!

falko 4th February 2013 13:01

Yes, that's right!

rlischer 4th February 2013 13:26

Thanks! This worked like a charm.


All times are GMT +2. The time now is 06:28.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.