proxy from xcl01
introduction
I am happy with the results from xcl01. I want to make the sites available to my home data network. I do this using the apache web server configuration. I don't use ipvsadm, the virtual server application.
install
This is all to do with apache2 which is already installed.
configure
- Open a CLI on the server host.
- Use su to switch to the root account.
- Create the file using the Vi text editor.
xcl01:~# cd /etc/apache2/sites-available xcl01:/etc/apache2/sites-available# vi test.planetlarg.com ~ ~ ~ "test.planetlarg.com" [New File]
- Add these lines.
<VirtualHost *:80> # # config will be... # http://test.planetlarg.com/ - drupal on xcl01 # http://test.planetlarg.com/mediawiki/ - mediawiki on xcl01 # http://test.planetlarg.com/phpmyadmin/ - PHPmyAdmin on xcl01 # http://test.planetlarg.com/nagios/ - nagios on ifw03 # http://test.planetlarg.com/cluster/ - virtual server on 200.0.0.10 # http://test.planetlarg.com/acng/acng-report.html - apt-cacher NG # #---------#---------#---------#---------#---------#---------#---------#- # bog standard # # server ServerAdmin nick@planetlarg.net ServerName test.planetlarg.com # 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> 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> # # # logs ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn # CustomLog /var/log/apache2/access.log combined # #---------#---------#---------#---------#---------#---------#---------#- # mediawiki # # copied from /etc/apache2/conf.d/mediawiki.conf # Alias /mediawiki /var/lib/mediawiki <Directory /var/lib/mediawiki/> Options +FollowSymLinks AllowOverride All order allow,deny allow from all </Directory> # some directories must be protected <Directory /var/lib/mediawiki/config> Options -FollowSymLinks AllowOverride None </Directory> <Directory /var/lib/mediawiki/upload> Options -FollowSymLinks AllowOverride None </Directory> #---------#---------#---------#---------#---------#---------#---------#- # phpmyadmin # # see /etc/apache2/conf.d/phpmyadmin.conf # #---------#---------#---------#---------#---------#---------#---------#- # nagios # # proxy security <Proxy *> Order deny,allow Allow from all </Proxy> # ProxyPass /nagios3 http://200.0.0.66/nagios3 ProxyPassReverse /nagios3 http://test.planetlarg.com/nagios3 # ProxyPass /cgi-bin/nagios3 http://200.0.0.66/cgi-bin/nagios3 ProxyPassReverse /cgi-bin/nagios3 http://test.planetlarg.com/cgi-bin/nagios3 # # #---------#---------#---------#---------#---------#---------#---------#- # cluster # http://test.planetlarg.com/infrastructure/host1 # # ProxyPass /cluster http://200.0.0.10 ProxyPassReverse /cluster http://test.planetlarg.com # # # #---------#---------#---------#---------#---------#---------#---------#- # acng apt-cacher-ng # http://test.planetlarg.com/acng/acng-report.html # # ProxyPass /acng http://200.0.0.66:3142/acng ProxyPassReverse /acng http://test.planetlarg.com/acng # # # #---------#---------#---------#---------#---------#---------#---------#- # drupal # # copied from /etc/apache2/conf.d/drupal6.conf # #DocumentRoot /usr/share/drupal6 Alias /drupal6 /usr/share/drupal6 # <Directory /usr/share/drupal6/> Options Indexes FollowSymLinks MultiViews AllowOverride All order allow,deny allow from all # # drupal clean URLs RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} ^/(.*)$ RewriteRule ^(.*)$ /index.php?q=$1 [L,QSA] </Directory> # </VirtualHost>
run
content
- Do stuff.
a2enmod proxy a2enmod proxy_http a2ensite test.planetlarg.com /etc/init.d/apache2 restart
- Close the CLI.
check your work
A script called apache2ctl gives many options for checking on apache2.
- Check virtual hosts.
/usr/sbin/apache2ctl -t -D DUMP_VHOSTS
- Close the CLI.
troubleshoot
Run it again with debugging. Write many lines to the activity log.
LogLevel debug

