I recently set up this blog on a virtual machine which is running on my home computer. Since soljerome.com was already running elsewhere, I decided to serve up the content using the existing apache instance at soljerome.com by setting up apache using a reverse proxy.
This particular setup is on Ubuntu 8.04 as that is the distribution running on my web server. My web server is able to view the virtual machine using an internal IP address of 10.10.10.34. Here is the /etc/hosts
entry
10.10.10.34 www.solnet www blog.solnet blog
So, I am able to view the blog from the web server by browsing to http://blog.solnet. Therefore, I needed to tell Apache was to take a URL like http://soljerome.com/blog, internally request http://blog.solnet, and give the result back to the viewer.
The first thing I needed to do was install the Apache mod_proxy module
aptitude install libapache2-mod-proxy-html
Then I enabled the proxy module by running
a2enmod proxy_html
After the module was enabled, I added the following lines to /etc/apache2/sites-available/default
ProxyRequests off <Proxy *> AddDefaultCharset off Order deny,allow Allow from all </Proxy> ProxyPass /blog http://blog.solnet ProxyVia off
Once I restarted Apache, I was able to browse to http://soljerome.com/blog successfully. There are still a few things that I have yet to get working properly (although I think most are due to bugs in WordPress). Some of the wp-admin links work but redirect to the internal address which forces me to have to click the back button on my browser (annoying). Also, trying to setup the admin interface to use SSL has proved to be a problem.