Wondering if someone can point me in the right direction regarding Apache or Nextcloud configuration, I have changed the port of my Nextcloud server from 80 to 800.
Modified the listen line in ports.conf file from 80 to 800
Modified the VirtualHost from 80 to 800
I did read that changes (in step 2) were also required in etc/apache2/site-available/nextcloud.conf – however, I did not have that line in my file. (Change port 443 and 80)
Restart apache
**symbolics links in etc/apache2/sites-anabled to the files below.
I can not access the Nextcloud site (http://mynextcloud:800/nextcloud) when I am on the local LAN Even though the DNS routes correctly as I get a response when I ping mynextcloud by IP address or by name. I went a step further and change the DNS entry on the local PC to 1.1.1.1 (got a reply)
When I not on the local LAN (from work) I can access http://mynextcloud:800/nextcloud from a webpage and from the PC Client Nextcoud app once I modified the configuration file to us se port 800 .
Thank you in advance.
System Info
Nextcloud 16.0.5.1
Ubuntu 18.04 LTS
Apache 2.4.29
PHP 7.2.24
Etc/apache2/Site-Available/nextcloud.conf
Alias /nextcloud “/var/www/nextcloud/”
<Directory /var/www/nextcloud/>
Options +FollowSymlinks
AllowOverride All
Dav off
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
I think your problem has nothing to do with changing the port to 800. Does it work if you use the local IP instead of the domain name?
DNS routes correctly as I get a response when I ping mynextcloud by IP address or by name. I went a step further and change the DNS entry on the local PC to 1.1.1.1 (got a reply)
Does it point to the internal or the external IP if you ping it? In order for it to work with external IP/DNS, your router has to support NAT-Loopback/Hairpinning. Some routers have “out of the box”-support for NAT-Loopback, on others you have to activate it and some routers don’t support it at all.
If your router does not support it you can run a local DNS server on a separate device like a raspberry pi. Something like Pi-hole would probably be the easiest way to do that. Or you can edit the hosts file on your computer to override the dns. Not possible on android or iOS as far as i know.
Does it work if you use the local IP instead of the domain name? actually it connected from chrome when using the IP, to my surprise.
I also do have an Internal DNS server used internally first before it goes out. I do have 1.1.1.1 as an alternate in the config (i will try to remove that it see if the issues is address.)
Not sure if NAT-Loopback/Hairpinning is an issues (Will Double check though) since it was working on port 80. first I will try to override on the host file.
I also do have an Internal DNS server used internally first before it goes out. I do have 1.1.1.1 as an alternate in the config (i will try to remove that it see if the issues is address.)
Not sure if NAT-Loopback/Hairpinning is an issues (Will Double check though) since it was working on port 80. first I will try to override on the host file.
What DNS-Server are you using? I still think it’s a DNS issue. What you need is a proper split DNS configuration.
On your internal DNS server:
Configure a host override entry, that points to the local address of your nextcloud server, so that local clients receive the configured response instead of the response from the upstream DNS servers.
Specify the gateway/router address or an external DNS server like 1.1.1.1 as upstream DNS server.
On your DHCP-Server (usualy your router):
Make sure that your DHCP server announces the address of your internal DNS server to all clients and that the clients only use the internal server for DNS requests.
What DNS-Server are you using? -
This is MS Server with DNS as the primary. Nothing out of the ordinary.
Not sure what the problem is here. I modified the local host file and sometimes got connected via chrome but was not able to authenticate with the PC client. Definitely not working as expected.
After wasting a good portion of my afternoon, I tried MS internet explorer and was able to connect and use the PC Client link to authenticate the client. Appear to be a Chrome issue or a Chrome/MS DNS problem. I am going to see if i dig dipper and get to the bottom of this. Make no sense!