Nginx or Apache and FCGI or PHP-FPM + Varnish with Directamdin Custombuild2

rnc

Verified User
Joined
Jun 8, 2013
Messages
72
Hello
i opened this tread because i dont find a complete guide to use apache + varnish or nginx + varnish in directadmin
so please share you experrince and than i try to create a complete directive guide


ill start with myself !

i installed a fresh DA with custombuild2 and nginx as default webserver
because of unkown reason the VPS that i tried to test ( a single vmware VM with 4*vcpu E1240v2 and 16GB of memory )
cant get more than 2Ghz of all server CPU resouce in normal webserving opration ( when i tried to buil and make something it could eat-up 80 % of CPU resources so this is could not be a VM problem )


i thinks this may be because of nginx and php-fpm that they together could not take more than 1 core ( i set up 4 core for worker_process in /etc/nginx/nginx.conf )

so i tried to install my old friend ( varnish ) in front of nginx so i clould reduce server load and use some RAM instead of HDD for static requested contents until i can figure out whats wrong with this server ( this server wil used to server pictures ( more than 1000GB of shared pictures in websites that they uploaded on this public image sharing website )
and one more this taht i forget to say is this server is hosted on single 2TB normal SATA disk so in heavy load there is lots of io wait ( i thinks i could be hdd problem if this is not related to CPU ! )
i decided to use varnish so i could use FREE RAM resource instead of a slow hard disk !

but no hope

i installed varnish like everytime and put it on port80
and then change lissten port of nginx on /etc/nginx/nginx.conf and /usr/local/directadmin/data/users/username/nginx.conf

but when i restarted nginx and test the changed website i get a resource not permitted error !
i dont change another site config in /usr/local/directadmin/data/users/username/nginx.conf and when i test that website it work normaly and with nginx !
 
Back
Top