Subdomain AND domain points to ownCloud


#1

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.


[solved]Installation wizard does not appear
Help properly setting up subdomain (cloud.domain.com)
#2

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!


#3

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