Best configuration for drupal site?
Which configuration is better for site?
Site run source drupal 7,on vps 1024 linode.
I was read many about:
1)Apache + Fastcgi
2)Nginx + Php-fpm
3)Nginx reverse proxy for apache run php backend…
Or anything else?
Thank you.
17 Replies
I use drupal 6 with nginx +fpm, not tried drupal 7 yet.
@obs:
Personally I'd go for nginx + fpm/fcgi, drupal (depending on what modules you're using) can be quite heavy on the php side so it's wise to skip apache and mod_php.
I use drupal 6 with nginx +fpm, not tried drupal 7 yet.
Thanks.
I run on vps 1024 but ab ben show score ending at 30req/s w/o cache and 400req/s with cache.How about that score?
However 400/requests/second should be decent enough, try running ab from other machines and test your responsiveness.
How many hits per day do you get?
400 requests per second for a dynamic website looks pretty good. Is that just the home page, or do you get similar results if you point ab at another dynamically generated page?
LinCached
Frankly though, 400 requests/sec should be plenty.
There're some good configs linked there also.
I have used this configuration
Pretty self explanatory.
@rok:
w/o cache: 18req/s……
How about nginx frontend for apache backend-php?
Why? If you want to use Apache then either don't use nginx or use nginx only for the static resources.
Alternatively use only nginx. Adding Apache to only process php will make you use more resources to achieve the same thing. I sincerely doubt that the configuration you just mentioned is going to give you what you are looking for.
Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.
However I still prefer nginx+fpm
@rok:
Thanks.
And hơw about litespeed ?license version.
Why pay for something when you can get something that does the same job for free?
@obs:
Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.
Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.
However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster compared to using Apache alone.
If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.
One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.
@hybinet:
@obs:Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.
Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.
However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster compared to using Apache alone.If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.
One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.
Thanks.
I run nginx with php-fpm and see fast than apache-php.
But i heard wome one say nginx -apache php backend reduce cpu load?how about this?
I would suggest you check the nginx configuration pages to ensure that you fine tune it to your specifications. A bad configuration will definitely impact your site.
HTH
@hybinet:
@obs:Actually nginx proxying back to apache with mod_php does reduce memory and speed things up.
Static files are served by nginx so are very quick, and mod_php is a fast way of running php files so again php files are run quickly, and since apache doesn't have to have many processes running you save RAM, you can also play with apache rewrite rules this way.
However I still prefer nginx+fpm
Just to clarify things on behalf of @obs, he means that the proxy setup saves memory and makes things faster compared to using Apache alone.If the comparison is between nginx+fpm and nginx+Apache, there is no real difference. 10 Apache processes with mod_php use about as much memory and can serve up about as many pages per second as 10 fpm processes.
One drawback of the proxy setup is that you need to maintain two web servers now. If you want to change anything, for example add a new virtual host or change the document root, you must edit configurations of two web servers and make sure that they're perfectly in sync.
Thanks.
I finished with varnish caching front end- nginx-php-fpm backend:D.
Finished at 7000r/s with cache.