Web Site and OC on the same server - it's possible?

Hi Everyone
Is it possible to configure VHost in such a way that the purchased domain (for example domainOne.pl) after entering into the browser displayed the page on my Apache2 + server after entering the IpServer / owncloud browser to get to the cloud?

I am asking for help in configuring VHost. I tried in different ways but to no avail or both vhosts work in mode:
IpSerwera / domainOne.pl
IpSerwera / ownCloud


domainOne.pl - works
IpServera / owncloud - does not work

my Vhosts:
                <VirtualHost *:80>

                    ServerAdmin     gielas.g@lgmail.com
                    DocumentRoot    /var/www/html/owncloud
                    ServerName      owncloud
                    ServerAlias     owncloud

                    <Directory /var/www/html/owncloud>
                            AllowOverride All
                            Order allow,deny
                            Allow from all
                            DirectoryIndex /var/www/html/owncloud
                            Options FollowSymlinks
                            SetEnv HOME             /var/www/html/owncloud
                            SetEnv HTTP_HOME        /var/www/html/owncloud


                    ErrorLog ${APACHE_LOG_DIR}/error.log
                    CustomLog ${APACHE_LOG_DIR}/access.log combined

    vhost domain:
        <VirtualHost *:80>
                ServerAdmin     gielas.g@gmail.com
                DocumentRoot    /var/www/html/ciesliska.pl
                ServerName      www.ciesliska.pl
                ServerAlias     ciesliska.pl
                CustomLog       /var/www/logs/ciesliska.log combined
                ErrorLog        /var/www/logs/ciesliska.log
                <Directory /var/www/html/ciesliska.pl>
                        AllowOverride All
                        Order allow,deny
                        Allow from all
                        DirectoryIndex /var/www/html/ciesliska.pl
                        Options FollowSymlinks


Thanks Very Much


how doese your trusted domain in config.php looks like?

Hi. My config.php:
‘trusted_domains’ =>
array (
0 => ‘’,
1 => ‘’,
2 => ‘’,
3 => ‘’,

when I type:

response firefox is:
The requested URL /owncloud/index.php was not found on this server.

vhost is for something like this:

if you want to use it like this:
you should have this configuration:

> cd /etc/apache2/conf-available
>  cat owncloud.conf                                                                                                    
    Alias /owncloud "/var/www/owncloud/"                                                                                                                                
    Header always set Strict-Transport-Security "max-age=15552000"                                                                                                      
        <Directory /var/www/owncloud/>                                                                                                                                      
            Options +FollowSymlinks                                                                                                                                         
            AllowOverride All                                                                                                                                               
            <IfModule mod_dav.c>                                                                                                                                            
                 Dav Off                                                                                                                                                    
            SetEnv HOME /var/www/owncloud                                                                                                                                   
            SetEnv HTTP_HOME /var/www/owncloud                                                                                                                              
        <FilesMatch ".+\.phps$">                                                                                                                                            
            # Deny access to raw php sources by default                                                                                                                     
            # To re-enable it's recommended to enable access to the files                                                                                                   
            # only in specific virtual host or directory                                                                                                                    
            Require all denied                                                                                                                                              
        # Deny access to files without filename (e.g. '.php')                                                                                                               
        <FilesMatch "^\.ph(p[3457]?|t|tml|ps)$">                                                                                                                            
            Require all denied                                                                                                                                              

 > cd /etc/apache2/conf-enable/
 > ln -sf ../conf-available/owncloud.conf owncloud.conf

but it will be available also with http://domain.com/owncloud, if the domain.com is not added into your config.php at trusted domain you will not be able to sign in.
If you don’t want at all to access it with http://domain.com/owncloud then you should play with:


I want to use:

  1. ciesliska.pl


Replace ServerName owncloud with ServerName ciesliska.pl
comment out ServerAlias owncloud by writing # at the beginning of the line.

ServerName ciesliska.pl
#ServerAlias owncloud

add ciesliska.pl to your trusted domains in config.php

and restart apache service.

> sudo systemctl restart apache2.service

I make subdomain like sub.ciesliska.pl. I’m waiting for propagation and we will see what happens :slight_smile:

is your domain with static IP or dynamic?

I have static IP. Made new domain xxx.ciesliska.pl and correctly conf vhost on my server and all app really perfect work.

In mobile app ownCloud on the fisrt minute of the life domain when I typing name of the the domain the app give me an error “the local copy name can not be changed”, but few hours later everything was work corectly - I think that was depent on domain propagation.

Thanks Everyone For Help Me