Created
May 11, 2018 16:19
-
-
Save tinchodev/a513f57f0cbb0a5c6eded47c06f9ec1b to your computer and use it in GitHub Desktop.
Apache + Varnish at Centos 7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://www.servermom.org/install-varnish-3-to-run-with-apache-2-on-centos-server/ | |
rpm -Uvh https://packagecloud.io/varnishcache/varnish30/packages/el/6/varnish-3.0.7-1.el6.x86_64.rpm | |
yum install varnish | |
sudo nano /etc/httpd/conf.d/000-default.conf | |
NameVirtualHost *:8082 | |
<VirtualHost *:8082> | |
sudo nano /etc/httpd/conf/httpd.conf | |
Listen 8082 | |
sudo nano /etc/sysconfig/varnish | |
DAEMON_OPTS="-a :80 \ | |
-T localhost:6082 \ | |
-f /etc/varnish/default.vcl \ | |
-S /etc/varnish/secret \ | |
-s malloc,256m" | |
sudo nano /etc/varnish/default.vcl | |
backend default { | |
.host = "127.0.0.1"; | |
.port = "8082"; | |
} | |
sudo cat /etc/varnish/secret |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment