# Nextcloud domain isn't working, but I can access through public IP address

**URL:** <https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480>\
**Category:** 📦 Appliances (Docker, Snappy, VM, NCP, AIO)\
**Tags:** snap\
**Created:** [September 5, 2019, 10:37pm UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480 "2019-09-05T22:37:03Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![YamiYukiSenpai](https://help.nextcloud.com/user_avatar/help.nextcloud.com/yamiyukisenpai/32/17508_2.png) [@YamiYukiSenpai](https://help.nextcloud.com/u/YamiYukiSenpai)\
**Post date:** [September 5, 2019, 10:37pm UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/1 "2019-09-05T22:37:03Z")

</div>

I added the domain I recently purchased with easyDNS (and managed by Cloudflare) to the trusted list. I made sure that the http and https ports are opened up, and can access the server with my public IP (which I just removed).

| Type | Name | Content |
| --- | --- | --- |
| A | yamiyukisenpai.tech | {public IP} |
| CNAME | easydns | [motorhead.easydns.org](http://motorhead.easydns.org) |
| CNAME | www | yamiyukisenpai.tech |
| MX | yamiyukisenpai.tech | [mx-caprica.easydns.com](http://mx-caprica.easydns.com) |

 ![Screenshot_20190905_183423](https://help.nextcloud.com/uploads/default/original/3X/b/a/ba050b3add1e55530e9a873186f89932ce7585b1.png)

 ![Screenshot_20190905_183402](https://help.nextcloud.com/uploads/default/original/3X/2/8/286b0c91b065a4b77933da056c5f70e6389a9eb0.png)

```auto
$ snap run nextcloud.occ config:system:get trusted_domains 
192.168.100.6
yamiyukisenpai.tech

```

What am I doing wrong exactly?

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [September 6, 2019, 1:39am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/2 "2019-09-06T01:39:09Z")

</div>

Based on the error, I’d say there’s an issue with the web server configuration. Can you post that?

Since it says too many redirects, it sounds like it’s making the connection, so the DNS is probably fine.

---

<div class="post-metadata">

**Author:** ![YamiYukiSenpai](https://help.nextcloud.com/user_avatar/help.nextcloud.com/yamiyukisenpai/32/17508_2.png) [@YamiYukiSenpai](https://help.nextcloud.com/u/YamiYukiSenpai)\
**Post date:** [September 6, 2019, 1:42am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/3 "2019-09-06T01:42:38Z")

</div>

```auto
<?php
$CONFIG = array (
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/snap/nextcloud/current/htdocs/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/snap/nextcloud/current/nextcloud/extra-apps',
      'url' => '/extra-apps',
      'writable' => true,
    ),
  ),
  'supportedDatabases' => 
  array (
    0 => 'mysql',
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.local' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/tmp/sockets/redis.sock',
    'port' => 0,
  ),
  'instanceid' => <secret>,
  'passwordsalt' => <secret>,
  'secret' => <secret>,
  'trusted_domains' => 
  array (
    0 => '192.168.100.6',
    1 => 'yamiyukisenpai.tech',
  ),
  'datadirectory' => '/media/DATA/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '15.0.11.1',
  'overwrite.cli.url' => 'http://192.168.100.6',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/sockets/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => <dbpassword>,
  'installed' => true,
  'maintenance' => false,
);

```

Just wondering, was there supposed to be a closing PHP tag?

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [September 6, 2019, 1:52am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/4 "2019-09-06T01:52:32Z")

</div>

That’s your Nextcloud configuration. I think your issue is going to be with the web server configuration. I think the snap uses Apache for the web server.

---

<div class="post-metadata">

**Author:** ![YamiYukiSenpai](https://help.nextcloud.com/user_avatar/help.nextcloud.com/yamiyukisenpai/32/17508_2.png) [@YamiYukiSenpai](https://help.nextcloud.com/u/YamiYukiSenpai)\
**Post date:** [September 6, 2019, 2:47am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/5 "2019-09-06T02:47:49Z")

</div>

What would the file name be?

The `/var/snap/nextcloud/curruent/apache` directory only has logs.

---

<div class="post-metadata">

**Author:** ![KarlF12](https://help.nextcloud.com/user_avatar/help.nextcloud.com/karlf12/32/46873_2.png) [@KarlF12](https://help.nextcloud.com/u/KarlF12)\
**Post date:** [September 6, 2019, 3:24am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/6 "2019-09-06T03:24:23Z")

</div>

I’m really not too sure about the snap version. When I found out the limitations of the snap version and had a bunch of trouble with Collabora, I switched to Docker.

I found this thread that seems to have some info. [https://help.nextcloud.com/t/snap-installation-change-php-apache-and-nextcloud-configs/32858/2](https://help.nextcloud.com/t/snap-installation-change-php-apache-and-nextcloud-configs/32858/2)

---

<div class="post-metadata">

**Author:** ![Reiner\_Nippes](https://help.nextcloud.com/user_avatar/help.nextcloud.com/reiner_nippes/32/9479_2.png) [@Reiner\_Nippes](https://help.nextcloud.com/u/Reiner_Nippes)\
**Post date:** [September 6, 2019, 7:42am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/7 "2019-09-06T07:42:48Z")

</div>

> [@YamiYukiSenpai](#):
>
> ‘overwrite.cli.url’ =\> ‘[http://192.168.100.6](http://192.168.100.6)’,

did you try: `'overwrite.cli.url' => 'http://yamiyukisenpai.tech',`

---

<div class="post-metadata">

**Author:** ![YamiYukiSenpai](https://help.nextcloud.com/user_avatar/help.nextcloud.com/yamiyukisenpai/32/17508_2.png) [@YamiYukiSenpai](https://help.nextcloud.com/u/YamiYukiSenpai)\
**Post date:** [September 6, 2019, 4:40pm UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/8 "2019-09-06T16:40:35Z")

</div>

Yup.

I also read that it might be the time & date setting, which I fixed, but that didn’t help.

Posted a [bug report on GitHub](https://github.com/nextcloud/nextcloud-snap/issues/1116). Hopefully this gets solved soon.

---

<div class="post-metadata">

**Author:** ![YamiYukiSenpai](https://help.nextcloud.com/user_avatar/help.nextcloud.com/yamiyukisenpai/32/17508_2.png) [@YamiYukiSenpai](https://help.nextcloud.com/u/YamiYukiSenpai)\
**Post date:** [September 6, 2019, 5:48pm UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/9 "2019-09-06T17:48:08Z")

</div>

Got it to work.

Had to change the SSL settings in Cloudflare to “full” from “medium”

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 4, 2024, 10:23am UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/10 "2024-12-04T10:23:35Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 3:33pm UTC](https://help.nextcloud.com/t/nextcloud-domain-isnt-working-but-i-can-access-through-public-ip-address/59480/11 "2024-12-11T15:33:47Z")

</div>


