Subdomain AND domain points to ownCloud

Hi,

My ownCloud server is installed and configured and everything works fine except for one thing!
My subdomain AND domain points to ownCloud.
Now I want to run and configure Wordpress on domain.de
Therefore, I access domain.de and always land on ownCloud not trusted domain website.
cloud.domain.de works fine.

Here my Virtual Host file:

<VirtualHost *:80>
ServerName  www.cloud.domain.de
DocumentRoot /var/www/html/owncloud
</VirtualHost>
Alias /owncloud "/var/www/html/owncloud"
<Directory /var/www/html/owncloud >
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>

<VirtualHost *:80>
ServerName  www.domain.de
DocumentRoot /var/www/html/wordpress
</VirtualHost>
Alias /owncloud "/var/www/html/wordpress"
<Directory /var/www/html/wordpress >
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/wordpress
SetEnv HTTP_HOME /var/www/html/wordpress
</Directory>

DNS entry:
cloud.domain.de 86400 A 0 IP address
domain.de 86400 A 0 IP address

Server configuration
Operating system: CentOS 7
Web server: Apache2
Database: MariaDB
PHP version:5.5
ownCloud version (see ownCloud admin page): 9.0.1
Updated from an older ownCloud or fresh install: fresh

Any Ideas?

Thanks in advance.

Put all this directory stuff in the as well and add an ServerAlias (similar thing for the wordpress vhost):
<VirtualHost *:80>
ServerName www.cloud.domain.de
ServerAlias cloud.domain.de
DocumentRoot /var/www/html/owncloud
Alias /owncloud "/var/www/html/owncloud"
<Directory /var/www/html/owncloud >
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/html/owncloud
SetEnv HTTP_HOME /var/www/html/owncloud
</Directory>
</VirtualHost>

Please note that: cloud.domain.de != www.cloud.domain.de
The VirtualHost configuration as you posted it, didn't work for cloud.domain.de!

1 Like

It worked!
Thank you so much you made my day :slight_smile:
I still have much to learn.

I get Index of site(empy or with owncloud folder) instead Owncloud web ui, when try to accessing via https with apache. I think I am lost and going in circle with apache for several days. I have owcloud installed in docker on ubuntu server. I have also Hassio with duckdns there, could this be problem? Or is just the apapche setting?

Hey,

i think this is an Apache setting where the access via https isn’t pointing to the location where owncloud is installed.