Um z.B. OwnCloud nicht unter http-Port 80 sondern wie hier unter Port 12380 anzubieten muss man die VirtualHost-Konfiguration von apache ändern.
Die Datei /etc/apache2/ports.conf editieren:
NameVirtualHost *.80 Listen 80 ... Listen 12380 ...
Neue Datei: /etc/apache2/sites-available/owncloud
NameVirtualHost *:12380
<VirtualHost *:12380>
DocumentRoot /usr/share/owncloud/
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /usr/share/owncloud/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Alias /owncloud /usr/share/owncloud/
ErrorLog ${APACHE_LOG_DIR}/owncloud-error.log
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/owncloud-access.log combined
</VirtualHost>
Den owncloud-Ordner nun von /var/www/owncloud nach /usr/share/owncloud verschieben.
Die Datei /usr/share/owncloud/config/config.php editieren:
... 'datadirectory' => '/usr/share/owncloud/data', ...
Als root einen symlink anlegen und Apache neu starten:
# ln -s /etc/apache2/sites-available/owncloud /etc/apache2/sites-enabled/owncloud # /etc/init.d/apache2 restart