Jump to content

Nginx + Apache OR Nginx + PHP-FPM


Recommended Posts

I have a dedicated server and my site have lots of static content. I have read about Nginx and its advantages in delivering static content as compared to Apache. To manage my server I also need Directadmin which is only available on Apache.

 

There are 2 ways to deploy Nginx (I believe):

1) Nginx as reverse proxy for static content + Apache at the back-end as main http server for dynamic content.

2) Nginx + PHP-FPM enabled to replace Apache altogether (for both static and dynamic content). (I will have to run Apache on separate port (other than 80) to use directadmin)

 

Which is the better way which can speed up the website. (Directadmin is ofcourse the second priority)

Link to comment
Share on other sites

I have never used nginx too, but IMHO you should proceed gradually : first, try to manage static resources with nginx, and then, maybe, move the whole site under nginx.

 

If you are looking to improve page load time I think only nginx to serve static resources will be sufficient.

Link to comment
Share on other sites

  • 1 year later...
  • 2 years later...

however using nginx + php-fpm requires the use of different rewrite rules (.htaccess files will not be read by nginx).

 

I've located many articles describing what rewrite rules would work with ps v1.6, however none of them seem to address product pages when friendly URL is enabled.  has anyone solved that yet?

Link to comment
Share on other sites

×
×
  • Create New...