|
|
files maintained by salt
|
|
|
|
|
|
remove /etc/apache2/sites/enabled/000-default.conf and restart apache
|
|
|
|
|
|
|
|
|
Create a jenkins site in /etc/apache2/sites-enabled/jenkins.conf
|
|
|
|
|
|
<VirtualHost *:80>
|
|
|
ServerAdmin webmaster@localhost
|
|
|
ServerName ci.company.com
|
|
|
ServerAlias ci
|
|
|
ProxyRequests Off
|
|
|
AllowEncodedSlashes NoDecode
|
|
|
<Proxy *>
|
|
|
Order deny,allow
|
|
|
Allow from all
|
|
|
</Proxy>
|
|
|
ProxyPreserveHost on
|
|
|
ProxyPass / http://localhost:8080/ nocanon
|
|
|
</VirtualHost>
|
|
|
|
|
|
Setup the proxy in /etc/apache2/mods-enabled:
|
|
|
|
|
|
proxy.conf
|
|
|
|
|
|
<IfModule mod_proxy.c>
|
|
|
# If you want to use apache2 as a forward proxy, uncomment the
|
|
|
# 'ProxyRequests On' line and the <Proxy *> block below.
|
|
|
# WARNING: Be careful to restrict access inside the <Proxy *> block.
|
|
|
# Open proxy servers are dangerous both to your network and to the
|
|
|
# Internet at large.
|
|
|
#
|
|
|
# If you only want to use apache2 as a reverse proxy/gateway in
|
|
|
# front of some web application server, you DON'T need
|
|
|
# 'ProxyRequests On'.
|
|
|
ProxyRequests Off
|
|
|
<Proxy *>
|
|
|
Order deny,allow
|
|
|
Allow from all
|
|
|
</Proxy>
|
|
|
</IfModule>
|
|
|
# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
|
|
|
|
|
|
proxy_http.load
|
|
|
|
|
|
# Depends: proxy
|
|
|
LoadModule proxy_http_module /usr/lib/apache2/modules/mod_proxy_http.so
|
|
|
|
|
|
proxy.load
|
|
|
|
|
|
LoadModule proxy_module /usr/lib/apache2/modules/mod_proxy.so
|
|
|
|
|
|
restart apache and see if jenkins is displayed. |
|
|
remove /etc/apache2/sites/enabled/000-default.conf, restart apache and see if jenkins is displayed. |