Ich möchte Rundcube und Nextcloud auf einem Host betreiben. Wenn ich die Vhosts einzeln starte funktionieren diese. Starte ich jedoch beide Vhosts funktioniert nur Roundcube, Nextcloud gibt einen Fehler aus.
Ich nutze http://example.com/rc und http://example.com/nc um Webseiten aufzurufen.
Wenn ich die Konfiguration für Roundcube global erstelle, nicht im VHost, dann funktioniert beides, Roundcube und Nextcloud. Im Apache2 error.log ist kein Fehler zu sehen
Für Nextcloud kommt dieser Fehler, wenn beide Vhosts enabled sind: Forbidden You don't have permission to access this resource. Apache/2.4.58 (Ubuntu) Server at localhost Port 80
Das sind meine Vhostconfigs:
Nextcloud
VirtualHost *:80>
Alias "/nc" "/var/www/html/nextcloud"
DocumentRoot /var/www/html/nextcloud
ServerName example.com
<Directory /var/www/html/nextcloud/>
Options FollowSymlinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/nextcloud/>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php [PT,L]
</Directory>
</VirtualHost>Roundcube
<VirtualHost *:80>
ServerName example.com
Alias "/rc" "/var/lib/roundcube/public_html"
DocumentRoot /var/lib/roundcube/public_html
<Directory /var/lib/roundcube/public_html/>
Options +FollowSymLinks
# This is needed to parse /var/lib/roundcube/.htaccess. See its
# content before setting AllowOverride to None.
AllowOverride All
<IfVersion >= 2.3>
Require all granted
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
</IfVersion>
</Directory>
# Protecting basic directories (not needed when the document root is
# /var/lib/roundcube/public_html):
<Directory /var/lib/roundcube/config>
Options -FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/lib/roundcube/temp>
Options -FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Deny from all
</IfVersion>
</Directory>
<Directory /var/lib/roundcube/logs>
Options -FollowSymLinks
AllowOverride None
<IfVersion >= 2.3>
Require all denied
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Deny from all
</IfVersion>
</Directory>
</VirtualHost>Wo liegt mein Fehler?
VG Harald
Bearbeitet von redknight:
Codeblöcke eingefügt