The big problem with Plesk Panel is that you can have a hard time working around it and changing its defaults.
In my case I wanted to configure Apache to listen on a different port than the default 80, in order to put Varnish in front of it. If you change it manually in the vhost config files and httpd.conf (talking here in particular about CentOS) it might work for a while but next time you make a change in the Plesk Panel everything is going to come back to default.
The solution is to run the following command:
/usr/local/psa/admin/sbin/websrvmng --set-http-port --port=8080 /usr/local/psa/admin/sbin/websrvmng --reconfigure-all
This changes the default http port that Plesk is going to use for HTTP vhosts and then reconfigure-all is going to rewrite the whole set of config files.
Please refer to http://blog.quilitz.de/2010/02/varnish-on-centos/ or other articles that you can find on Google, this one should be easy using yum.
On CentOS, you have to reconfigure Varnish to listen on port 80. This can be done in /etc/sysconfig/varnish. Look for DAEMON_OPTS and change it to look like the following:
DAEMON_OPTS="-a :80 \ -T localhost:6082 \ -f /etc/varnish/default.vcl \ -s file,/var/lib/varnish/varnish_storage.bin,1G"
On Ubuntu, this can be done in /etc/default/varnish
Please first make a backup of /etc/varnish/default.vcl so that you can come back to it whenever necessary. This is how it should look like for you:
backend default {
.host = "127.0.0.1";
.port = "8080";
}
This entry was written by , posted on March 11, 2011 at 1:34 pm, filed under Server administration and tagged centos, plesk, sysadmin, varnish. Leave a comment or view the discussion at the permalink.