Varnish now working.
Signed-off-by: Melissa Avery-Weir <averymd@irrsinn.net>
This commit is contained in:
42
jenkins/default-vhost
Normal file
42
jenkins/default-vhost
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
<VirtualHost *:8090>
|
||||||
|
ServerAdmin webmaster@localhost
|
||||||
|
ServerName irrsinn.net
|
||||||
|
|
||||||
|
DocumentRoot /var/www
|
||||||
|
<Directory />
|
||||||
|
Options FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
</Directory>
|
||||||
|
<Directory /var/www/>
|
||||||
|
Options Indexes FollowSymLinks MultiViews
|
||||||
|
AllowOverride None
|
||||||
|
Order allow,deny
|
||||||
|
allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
|
||||||
|
<Directory "/usr/lib/cgi-bin">
|
||||||
|
AllowOverride None
|
||||||
|
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
ErrorLog ${APACHE_LOG_DIR}/error.log
|
||||||
|
|
||||||
|
# Possible values include: debug, info, notice, warn, error, crit,
|
||||||
|
# alert, emerg.
|
||||||
|
LogLevel warn
|
||||||
|
|
||||||
|
CustomLog ${APACHE_LOG_DIR}/access.log combined
|
||||||
|
|
||||||
|
Alias /doc/ "/usr/share/doc/"
|
||||||
|
<Directory "/usr/share/doc/">
|
||||||
|
Options Indexes MultiViews FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
Order deny,allow
|
||||||
|
Deny from all
|
||||||
|
Allow from 127.0.0.0/255.0.0.0 ::1/128
|
||||||
|
</Directory>
|
||||||
|
|
||||||
|
</VirtualHost>
|
||||||
1
jenkins/default.vcl
Normal file
1
jenkins/default.vcl
Normal file
@@ -0,0 +1 @@
|
|||||||
|
include "/etc/varnish/projects.irrsinn.net.vcl";
|
||||||
11
jenkins/fabfile.py
vendored
11
jenkins/fabfile.py
vendored
@@ -1,5 +1,5 @@
|
|||||||
from __future__ import with_statement
|
from __future__ import with_statement
|
||||||
from fabric.api import settings, abort, run, cd, env
|
from fabric.api import settings, abort, run, cd, env, put
|
||||||
|
|
||||||
env.hosts = ['projects.irrsinn.net']
|
env.hosts = ['projects.irrsinn.net']
|
||||||
env.user = 'root'
|
env.user = 'root'
|
||||||
@@ -7,6 +7,8 @@ env.user = 'root'
|
|||||||
def apache_config():
|
def apache_config():
|
||||||
with cd('/etc/apache2/sites-available'):
|
with cd('/etc/apache2/sites-available'):
|
||||||
put('projects.irrsinn.net-vhost', 'projects.irrsinn.net')
|
put('projects.irrsinn.net-vhost', 'projects.irrsinn.net')
|
||||||
|
put('default-vhost', 'default')
|
||||||
|
run('apache2ctl -k restart')
|
||||||
|
|
||||||
def base_installs():
|
def base_installs():
|
||||||
run('apt-get update')
|
run('apt-get update')
|
||||||
@@ -47,3 +49,10 @@ def tomcat_install():
|
|||||||
run('/etc/init.d/tomcat7 start')
|
run('/etc/init.d/tomcat7 start')
|
||||||
|
|
||||||
def varnish_config():
|
def varnish_config():
|
||||||
|
with cd('/etc/varnish'):
|
||||||
|
put('projects.irrsinn.net.vcl', 'projects.irrsinn.net.vcl', mode=0755)
|
||||||
|
put('default.vcl', 'default.vcl', mode=0755)
|
||||||
|
run('pkill varnishd', warn_only=True)
|
||||||
|
run('apache2ctl -k restart')
|
||||||
|
run('service varnish restart')
|
||||||
|
run('varnishd -f /etc/varnish/default.vcl -s malloc,256M -a :80')
|
||||||
@@ -1,12 +1,9 @@
|
|||||||
<VirtualHost *:80>
|
<VirtualHost *:8088>
|
||||||
ServerAdmin averymd@irrsinn.net
|
ServerAdmin averymd@irrsinn.net
|
||||||
|
|
||||||
ServerName projects.irrsinn.net
|
ServerName projects.irrsinn.net
|
||||||
DocumentRoot /var/www/projects.irrsinn.net
|
DocumentRoot /var/www/projects.irrsinn.net
|
||||||
<Directory /var/www/projects.irrsinn.net>
|
|
||||||
Options FollowSymLinks
|
|
||||||
AllowOverride None
|
|
||||||
</Directory>
|
|
||||||
<Directory /var/www/projects.irrsinn.net/git>
|
<Directory /var/www/projects.irrsinn.net/git>
|
||||||
Options Indexes FollowSymLinks MultiViews
|
Options Indexes FollowSymLinks MultiViews
|
||||||
AllowOverride All
|
AllowOverride All
|
||||||
|
|||||||
28
jenkins/projects.irrsinn.net.vcl
Normal file
28
jenkins/projects.irrsinn.net.vcl
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
backend jenkins {
|
||||||
|
.host = "projects.irrsinn.net";
|
||||||
|
.port = "8080";
|
||||||
|
.connect_timeout = 300s;
|
||||||
|
.first_byte_timeout = 120s;
|
||||||
|
.between_bytes_timeout = 300s;
|
||||||
|
.max_connections = 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
backend git {
|
||||||
|
.host = "projects.irrsinn.net";
|
||||||
|
.port = "8088";
|
||||||
|
.connect_timeout = 300s;
|
||||||
|
.first_byte_timeout = 120s;
|
||||||
|
.between_bytes_timeout = 300s;
|
||||||
|
.max_connections = 800;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub vcl_recv {
|
||||||
|
|
||||||
|
if ((req.http.host ~ "projects.irrsinn.net") && (req.url ~ "jenkins"))
|
||||||
|
{
|
||||||
|
set req.backend = jenkins;
|
||||||
|
} else {
|
||||||
|
set req.backend = git;
|
||||||
|
}
|
||||||
|
return (pass);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user