Changes between Version 6 and Version 7 of faq/shared-varnish-server
- Timestamp:
- May 1, 2012, 5:04:42 PM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
faq/shared-varnish-server
v6 v7 56 56 Our current varnish server is `dolores.mayfirst.org`. A support team member needs to make the following configuration changes for each new hosting order. If you need these changes made and you aren't a member of the support team, please [/newticket open a new ticket explaining what you need to happen]. 57 57 58 '''NOTE:''' The below instructions are not quite correct, will be updated soon. 58 * In your puppet configuration '''puppet/modules/mayfirst/files/varnish''' 59 * Create a new vcl file for the domain, i.e. `/etc/varnish/VARNISH_SERVER_NAME/domain-name.vcl` 60 * Copy the format of a current vcl file, depending on the CMS. The include lines will vary depending on the CMS. We currently have default varnish files for wordpress and drupal. 61 * Make the needed changes to the file which should be the line that references the domain, make sure the domain is accurate. In the example below "occupychicago\.org" should read "YOUR_DOMAIN_NAME\.org". 62 {{{ 63 sub vcl_recv { 64 if (req.http.host ~ "^(www\.)?chicagospring\.org" ) { 65 include "/etc/varnish/dolores/drupal-includes/drupal-recv.vcl"; 66 } 67 } 68 }}} 69 * Add an include line in `/etc/varnish/VARNISH_SERVER_NAME/vhosts-list.vcl` for the file you created above. 70 * When your changes are complete commit them to the repository and do git push SERVER_NAME or freepuppet-helper gp:SERVER_NAME. 71 * Make sure to follow the puppet output for any errors. 59 72 60 * Create a new vcl file for the domain, i.e. `/etc/varnish/vhosts/domain-name.vcl` 61 * Copy the format of a current vcl file, depending on the CMS. 62 * Add an include line in `/etc/varnish/vhosts/vhosts-list.vcl` for the file you created above. 63 * run `/etc/init.d/varnish reload` 73 '''NOTE 0:''' We currently have not worked out a way for varnish to work across multiple servers. So the above method will only work with a single guest server, at the time of this writing kerr.mayfirst.org. Hopefully we'll be able to support multiple guests soon. 64 74 65 75 '''NOTE:''' The above instructions should ultimately become a part of puppet or red.