Ubuntu sites-enabled and ISPConfig

At the weekend, I wanted to add a new WordPress site to our shared host for a local charity in Cardiff. In ISPConfig, this is usually pretty trivial – the GUI takes care of everything for you. But this time, the new site wasn’t working. Instead, it was always getting caught by the wildcard subdomain that we have set up on properdesign.rs.

We’re using Ubuntu for our shared host, so the first place to check was to see if there was anything weird in the .vhost file generated by ISPConfig in sites-available. Everything looked fine.

The next idea was to run apache2ctl -S. Again, everything looked fine – our new site showed up as expected.

Then I had a look in sites-enabled. With Apache on Ubuntu, this stores symlinks to all the vhosts files in sites-available. Each entry is preceded by a priority code of some description. I noticed that my new domain appeared after the wildcard in the list, so it was simply a matter of renaming the symlink.

$ mv 100-newsite.properdesign.rs.vhost 001-newsite.properdesign.rs.vhost

Easy (once you know how…).