Posts

Showing posts from August, 2007

Jetty - lost in the web

Grails uses an embedded Jetty instance to serve the application during development. I'm trying to figure out how to configure it with Apache in front using mod_proxy - this means I need to do some Jetty configuration so that when running Jetty it knows it has a proxy in front of it. It seems though that jetty.mortbay.org is not available on the web (for the last 24 hours I've been getting 'Can't find the server'). Google, however is turning up a lot of documentation that points there. So, its taken a long time to find information not on jetty.mortbay.org. http://docs.codehaus.org/display/JETTY/Jetty+Wiki seems to be the best reference - it has working links to the binary distributions and source repositories.

Apache 2 mod_proxy - 403 error

I've been trying to put Apache2 in front of my Grails Jetty instance so that I can have common resources served by httpd and not included in my Grails web application. I enabled the proxy module , but always got 403 forbidden errors. Searching around the web turned up this post , which lead me to check which modules were loaded. Where I had simply done: a2enmod proxy I really need to also do: a2enmod proxy_http a2enmod proxy_connect Of course, after enabling these modules, remember to force a reload: /etc/init.d/apache2 force-reload

Nautilus - stop opening new windows

Image
Nautilus on Fedora has an annoying habit of opening new windows every time you double click on a directory. This is enough to drive any one mad, but there is a solution. Under the edit menu select preferences. On the behaviour tab click the 'Always open in browser windows'. Not particularly intuitive. Thanks to Lars E. Pettersson for this tip! Now, Nautilus behaves sensibly and we have access to the directory tree.

Dovecot - Error: No protocols given in configuration file

I have been trying to get Dovecot running on my laptop for development purposes, but something went wrong somewhere. The service never started and running the /etc/init.d/dovecot start script never complained or produced any output. Just trying to find out what the problem is can be difficult sometimes, never mind finding the solution to the problem. Luckily excellent documentation from the makers came to the rescue. A wiki entry on logging showed how to find where the logs are: root@laptop:~# grep "starting up" /var/log/* /var/log/acpid:[Sun Aug 19 14:05:05 2007] starting up But no mention of Dovecot in those logs. The clue came from directly running dovecot: root@laptop:~# dovecot Error: No protocols given in configuration file And sure enough, looking at /etc/dovecot/dovecot.conf showed: ... # Protocols we want to be serving: imap imaps pop3 pop3s # If you only want to use dovecot-auth, you can set this to "none". #protocols = imap imaps protocols = ... Setting

ProFTPd - Fatal: Socket operation on non-socket

I was trying to set up ProFTPd on Ubuntu recently and for some reason it wouldn't start. Somehow the configuration had been messed up (or something had been). I uninstalled and reinstalled it, but still it wouldn't start. While trying to fix this problem, I came across this brilliant FAQ:ร‚  Chapter 4. Common Running problems . This described all the problems I was having: 3. Unable to bind to port/Address already in use 5. "Fatal: Socket operation on non-socket" It's great to see such a useful FAQ.

Wordpress themes

Looking for Wordpress themes? Try WPThemesFree.com . This site catalogues tons of themes, and has them categorised appropriately (number of columns, colour scheme, topic). You can view the themes against the test database, and there are statistics available for downloads, views, and tests.

VMWare Server - Can ping but nothing else between host and guest

I've been using VMWare Server for testing some software and I've found it very easy to use and extremely valuable. This is a free product that lets you create virtual servers using multiple operating systems. Its great, because you can install an OS and then back it up in that state. Then you can make modifications (try out various configurations or software products) while being able to easily revert to a back up at any time. I'd created a VM on one PC and after a while I transferred it to another host. I thought all was well, until I tried to SSH to it. No joy. I thought something was up with the networking, since I was also using it on another network and had changed from DHCP to static ip addresses. After a while I figured that: the host could ping the guest the guest could ping the host the guest could see the internet no other networking (http, ssh etc) worked Now that I knew what I was dealing with, I quickly found a bug report: Bug #105697 in vmware-player

The PHP binary coming with ISPConfig does not work properly on your system!

Ahhh, this old chestnut. I was installing ISPConfig-2.2.5 when I came across this. I'd done a Fedora 5 install as per The Perfect Setup - Fedora Core 5 (at least I think I followed it exactly), but I still came up with this error. I found this forum entry (see post 13) , and essentially I needed to install bison and flex. I issued this command to make sure I had everything: yum install make bison flex gcc I think it was 'bison' that made the difference, because I've actually seen a different error when flex is not installed. I have to say, Till and Falko (and others?) at HowToForge are fantastic, and have created a great resource on the web. These guys really know their stuff and are very helpful.

Basic Apache2 setup

I just installed Apache 2.2.4 on Windows XP. I needed to set up virtual hosts , so I added the following to C:\WINDOWS\system32\drivers\etc\hosts: 127.0.0.1 server1.localhost server2.localhost 127.0.0.1 www.server1.localhost www.server2.localhost Now to configure Apache, the virtual host configuration needs to be included in C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd.conf by uncommenting the line containing: Include conf/extra/httpd-vhosts.conf Edit C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-vhosts.conf to set up your virtual hosts รข€“ In my case I used the following: NameVirtualHost *:80 <Directory /> Order deny,allow Allow from all </Directory> <VirtualHost 192.168.0.102:80> ServerAdmin webmaster@server1.localhost DocumentRoot /www/docs/server1.localhost ServerName server1.localhost ServerAlias www.server1.localhost ErrorLog logs/server1.localhost-error_log CustomLog logs/server1.localhost-access_log common </Virt

Constantly learning what not to do

I'm sitting here looking at a JSP file which is over 5000 lines long. It has a massive amount of Java code and JavaScript scattered through it, along with some custom tag libraries. It generates an HTML file over 1.5 meg in download size. The workstation I am using is a Pentium D with 1 Gig of RAM, and the tools I'm using can't cope so I'm resorting to simple text editors to make changes. Once again, I'm spending most of my time at work learning (once again) what not to do. I'm one of the (apparently) few people who know not to do this kind of thing. But this is where I spend most of my time - fixing other peoples mistakes - and unfortunately this is a direct impediment to me learning new, better things and improving myself. I'm really looking forward to the day a manager says: "Instead of getting 3 developers who don't know what they are doing to build the system, and then bring someone good in to fix it, why don't we get one good developer to

Distributing applications as zip files

I really like just being able to download a program as a zip file, unzip it, and run it. Sure, an installer has some advantages such as adding shortcuts to your menu etc, but I don't rate these as highly as the convenience and simplicity of a 'zip install'. This is especially true for Java programs which can remain platform independent. I even use the same installation on my dual boot laptop - regardless of whether I'm in Windows or Linux, I can just have the one binary unzipped to a common location. There is another reason why simplicity wins too - at work the corporate environment is necessarily complex. I just tried installing a program ( WinMerge ) through an installer and it claimed that 'You must be logged in as an administrator when installing this program'. I am supposed to have administrator rights on this machine. I've run other installers ( FireFox ) okay. So this installer tried to do something different and apparently it couldn't. Luckily t