Hi!
I am installing Nextcloud locally in my lampstack under Linux Mint. If I place Nextcloud under localhost (localhost/nextcloud) everything works fine. But my aim is to run Nextcloud under a virtualhost that I have set up, nextcloud.example.com. The virtualhost works with bitnami’s “demo app files” but when I replace them with the contents of the Nextcloud folder I am blocked out by Nextcloud’s .htaccess when pointing the browser to the install page.
If I remove the snippet below then I can access the page with the install script (I have not tried running it).
Do I need to add something related to my virtualhost so that it is not blocked?
Hi @levlaz
Thanks for your reply!
I don’t know if it is relevant or not but since I am using Bitnami Lampstack I did not make the virtualhosts configuration globally in Apache, but only for the Nextcloud app in the file:
/home/peter/lampstack/apps/nextcloud/conf/httpd-vhosts.conf:
<VirtualHost *:8080>
ServerName nextcloud.ecureuil.io
DocumentRoot "/home/peter/lampstack/apps/nextcloud/htdocs"
Include "/home/peter/lampstack/apps/nextcloud/conf/httpd-app.conf"
</VirtualHost>
<Directory "/home/peter/lampstack/apps/nextcloud/htdocs">
Options Indexes MultiViews
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3>
Require all granted
</IfVersion>
</Directory>
Alias /nextcloud/ "/home/peter/lampstack/apps/nextcloud/htdocs/"
Alias /nextcloud "/home/peter/lampstack/apps/nextcloud/htdocs"
Include "/home/peter/lampstack/apps/nextcloud/conf/httpd-app.conf"
And globally for Bitnami:
/home/peter/lampstack/apache2/conf/bitnami/bitnami-apps-vhosts.conf
#Bitnami applications installed in a Virtual Host
Include "/home/peter/lampstack/apps/nextcloud/conf/httpd-vhosts.conf"
/home/peter/lampstack/apache2/conf/bitnami/bitnami.conf (but I have not changed/added anything in this default config)
# Default Virtual Host configuration.
<IfVersion < 2.3 >
NameVirtualHost *:8080
NameVirtualHost *:8443
</IfVersion>
<VirtualHost _default_:8080>
DocumentRoot "/home/peter/lampstack/apache2/htdocs"
<Directory "/home/peter/lampstack/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
# Error Documents
ErrorDocument 503 /503.html
# Bitnami applications installed with a prefix URL (default)
Include "/home/peter/lampstack/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
# Default SSL Virtual Host configuration.
<IfModule !ssl_module>
LoadModule ssl_module modules/mod_ssl.so
</IfModule>
Listen 8443
SSLProtocol all -SSLv2 -SSLv3
SSLHonorCipherOrder on
SSLCipherSuite "EECDH+ECDSA+AESGCM EECDH+aRSA+AESGCM EECDH+ECDSA+SHA384 EECDH+ECDSA+SHA256 EECDH+aRSA+SHA384 EECDH+aRSA+SHA256 EECDH !aNULL !eNULL !LOW !3DES !MD5 !EXP !PSK !SRP !DSS !EDH !RC4"
SSLPassPhraseDialog builtin
SSLSessionCache "shmcb:/home/peter/lampstack/apache2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
<VirtualHost _default_:8443>
DocumentRoot "/home/peter/lampstack/apache2/htdocs"
SSLEngine on
SSLCertificateFile "/home/peter/lampstack/apache2/conf/server.crt"
SSLCertificateKeyFile "/home/peter/lampstack/apache2/conf/server.key"
<Directory "/home/peter/lampstack/apache2/htdocs">
Options Indexes FollowSymLinks
AllowOverride All
<IfVersion < 2.3 >
Order allow,deny
Allow from all
</IfVersion>
<IfVersion >= 2.3 >
Require all granted
</IfVersion>
</Directory>
# Error Documents
ErrorDocument 503 /503.html
# Bitnami applications installed with a prefix URL (default)
Include "/home/peter/lampstack/apache2/conf/bitnami/bitnami-apps-prefix.conf"
</VirtualHost>
# Bitnami applications that uses virtual host configuration
Include "/home/peter/lampstack/apache2/conf/bitnami/bitnami-apps-vhosts.conf"