You can follow all the steps of the official HowTo "The Perfect Server – Ubuntu 13.04 (Apache2, BIND, Dovecot, ISPConfig 3)". To get it to work afterwards on Ubuntu 13.10, use these additional steps:
- Switch to a .vhost naming scheme for Apache2 site configurations. In Apache2 2.4, only the sites-enabled/*.conf files will be loaded automatically, missing out ISPConfig's /etc/apache2/sites-enabled/*.vhost. Usually we would rename them to .conf, but because .vhost files are also generated automatically for every website created in ISPConfig, we instead adapt what Apache2 loads. Because that is less work than adapting the source code of ISPConfig. Note in the following commands, both for sites and further down for config snippets, that it's important to keep the original apps.vhost and ispconfig.vhost included at the start of the site inclusion process, so let's keep the "000-" and "100-" prefixes used by ISPConfig [source].
- In /etc/apache2/apache2.conf, replace line "IncludeOptional sites-enabled/*.conf" with "IncludeOptional sites-enabled/*.vhost".
mv /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/000-default.vhost;
mv /etc/apache2/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.vhost;
mv /etc/apache2/sites-available/apps.vhost /etc/apache2/sites-available/000-ispconfig-apps.vhost;
ln -s ../sites-available/000-ispconfig-apps.vhost /etc/apache2/sites-enabled/000-ispconfig-apps.vhost;
mv /etc/apache2/sites-available/ispconfig.vhost /etc/apache2/sites-available/000-ispconfig.vhost;
ln -s ../sites-available/000-ispconfig.vhost /etc/apache2/sites-enabled/000-ispconfig.vhost;
- Move and rename the ISPConfig Apache2 config file. In addition, the ISPConfig .conf files which are also present actually contain configuration information and not vhost directives for sites, so
a2dissitecannot handle them. They are now expected in /etc/apache2/conf-available, to be handled by
a2disconf. So let's rearrange things a bit to solve this (note that we use a ".local" suffix to indicate local configuration additions, not provided via OS packages):
mv /etc/apache2/sites-available/ispconfig.conf /etc/apache2/conf-available/000-ispconfig.local.conf;
- (optional) Fix a2ensite and a2dissite. Due to our transition to the ".vhost" naming scheme for Apache2 site configurations,
a2dissitedo not work any more because they expect a .vhost suffix. Not too bad because one will enable and disable most sites within ISPConfig anyway. However, we can also repair this by supplying a local alternative with a fix in the source code:
cp /usr/sbin/a2ensite /usr/local/bin;
ln -s a2ensite /usr/local/bin/a2dissite;
- In file /usr/local/bin/a2ensite, replace line 60 "$sffx = '.conf';" with "$sffx = '.vhost';".
- Ensure with
which a2dissitethat your local alternatives are in use now.
- Unfortunately, this fix only works for sites not handled by ISPConfig. To also handle those created by ISPConfig, one has to find a solution for the fact that ISPConfig creates the symlinks with a "100-" prefix while the site configurations in sites-available/ miss this. The simplest is to provide an alternative with that prefix in sites-available/ as well, using something like:
ln -s example.com.vhost /etc/apache2/sites-available/100-example.com.vhost;
- Fix a syntax error about directory options. Apache would now complain about a syntax error: "Either all Options must start with + or -, or no Option may." So add a "+" character before all options missing a "+" or "-" prefix in:
/etc/apache2/sites-available/000-ispconfig-apps.conf line 30
/etc/apache2/sites-available/000-ispconfig.conf line 20
- Remove the NameVirtualHost directives. They don't really hurt, but are effectless and deprecated in Apache 2.4, generating warnings when restarting Apache. So remove them from:
/etc/apache2/sites-available/000-ispconfig.conf line 8
/etc/apache2/conf-available/000-ispconfig.conf lines 53 and 54
- Reload the Apache configuration.
service apache2 reload;
- Test ISPConfig and configure it. If you have enabled SSL for the ISPConfig site during the installation configure script, try visiting your server's FQDN at port 8080 in your browser (like browsing to https://hostname.example.com:8080/). Initial username and password are "admin" and "admin" – remember to change them immediately. The remaining configuration happens from inside the ISPConfig 3 panel.