Sunday, 11 September 2005

Isn't Technology Wonderful

I'm attending the Microsoft PDC and this morning I was awake early because of jet lag. I was sat in my hotel room in Los Angeles, connected to the Internet through a broadband connection, VPN'd into my router at home (in Cheltenham UK), using SSH to connect to my Linux server and then using emacs to edit files on that server (trying to fix my blog setup issues), while talking to a friend in Australia using Microsoft Messenger!

I attended my first PDC in 1992, when none of this technology was common place. It just struck me how far we'd come in less than 15 years!

Wonderful!

Posted by kevin at 11:56 PM in Technology

Blojsom and Apache Virtual Server

I've finally got this to work the way I wanted to although there are still some things in the setup I need to fix. I want to document the setup I have here in case anybody else tries to do the same thing.

As Blojsom is a Java web app I needed a Java web server, and being very familiar with Tomcat I chose to use that server (currently 5.5.9). The machine that hosts this blog is running Apache and I can't remove Apache just to run Tomcat so I had to get them both working together

The simplest solution was to use mod_proxy and just for giggles I decided to go with the VirtualHost approach. I found this Document and used that as the basis for setting up my server. Initially my VirtualHost entry looke like this

NameVirtualHost *:80
<VirtualHost *:80>
  ServerName blogs.advantaje.com

  ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPass        /  http://localhost:8081/blojsom/
  ProxyPassReverse /  http://localhost:8081/blojsom/

  ErrorLog /etc/httpd/logs/blogs_error.log
  LogLevel warn
  CustomLog /etc/httpd/logs/blogs_access.log combined

</VirtualHost>
i.e. forwarding any call to http://blogs.advantaje.com to http://localhost:8081/blojsom/
However this failed when I tried to adminsiter the site. I kept getting asked to log-in whenever I tried to perform any administrative task, so I'd log in, try the task again and be asked to login,a nd go round and round that loop!

In the end I went with a different solution. I create another instance of Tomcat, made Blojsom the default (ROO) app, changed the ports in TC from the default values and changed the VirtualHost to look like

NameVirtualHost *:80
<VirtualHost *:80>
  ServerName blogs.advantaje.com

  ProxyRequests Off

  <Proxy *>
    Order deny,allow
    Allow from all
  </Proxy>

  ProxyPass        /  http://localhost:48081/
  ProxyPassReverse /  http://localhost:48081/

  ErrorLog /etc/httpd/logs/blogs_error.log
  LogLevel warn
  CustomLog /etc/httpd/logs/blogs_access.log combined

</VirtualHost>
Blojsom's happy and I'm happy!

Posted by kevin at 11:39 PM in General

« September »
SunMonTueWedThuFriSat
    123
45678910
11121314151617
18192021222324
252627282930