Owncloud shows IP Address instead of domain

February 19, 2015 2.5k views

I have a Ubuntu droplet with owncloud on it, I got a domain name from Gandi, set everything up according to the tutorials here (DNS, records). I can access my server using the domain name but when I do it, it redirects to the IP address. How can I fix that?

  • @wuher

    What does your current DNS configuration look like at Gandi? Feel free to sub your domain with something such as MYDOMAIN.COM if you'd rather not publish it on an open forum, just make sure you include all applicable records (A, CNAME, TXT etc).

    In many cases, DNS could be the issue, in others, it could be a server configuration issue. Have you modified any of the server configuration files since deploying the One-Click App?

  • I haven't touched any files on the server.

    My DNS records:

    A: @
    A: test
    CNAME: www mydomain.com.
    NS: ns1.digitalocean.com.
    NS: ns2.digitalocean.com.
    NS: ns3.digitalocean.com.

  • are you using as an example, or is that actually what you have in your A record? If so, then you should find the ip address of your droplet and use that instead...should be next to your droplet info in DO panel

  • Yeah I put it as an example, my actual records have the real IP address. I might be a retarded in terms of running a server, but fortunately I'm not that stupid.

2 Answers

I am looking at my owncloud install under /config/config.php and there is a part with the domain:

'trusted_domains' => 
  array (
    0 => 'cloud.mydomain.com',

You might try adding your domain to that array, or if that section does not exist, add it

In order to use your own domain with the site, you will need to update your Apache configuration. Edit both /etc/apache2/sites-available/owncloud-ssl.conf and /etc/apache2/sites-available/000-owncloud.conf and replace the line:

#ServerName www.example.com


ServerName your_domain.com

Next, you should edit the trusted_domains entry in you ownCloud configuration. This is located in/var/www/owncloud/config/config.php```

'trusted_domains' => 
  array (
    0 => 'your_domain.com',

You will need to restart Apache in order for the changes to take affect:

sudo service apache2 restart
Have another answer? Share your knowledge.