Problem: I have set up my first Apache 2 web server to host my personal website and Nextcloud. It's running on a Raspberry Pi and through various guides and videos I have managed to make the website and cloud available from outside my own network. However, when I try to access it from any device on the same IP as the web server, it doesn't work. Of course, using my local ip to access the site and cloud do work (though images on the website don't work because these are linked to my domain).
Research:I have not bee able to get any use out of previous similar posts, most of which don't have concrete answers either. From what I can gather there are several things that could be an issue here: config files (hosts, ports, apache2 etc.), my custom ClouDNS setup, my DHCP/static IP setup, or some setting in the router.
My setup:
- Pi has static local IP
- ClouDNS provides the link between my domain and the public IP of my home network
- I have exactly followed this (Instructable link) tutorial with the exception of installing the RAID, which is irrelevant
- I initially installed No-IP and used it, but I don't any longer. It's still installed on the Pi though, not sure if that matters.
- Despite the manual editing of the SSL encryption via the Instructable, I did edit and run the DietPi-Letsencrypt service. again, not sure if it matters.
- Ports 443 and 80 are properly forwarded in the router and I am running DHCP for my network with the exception of the Pi, which has a locked IP. I also set up the static IP including public DNS in the Dietpi-Config. Some issue there?
- The one thing I am puzzled about is the part in the Instructable where I comment out all of /etc/apache2/sites-available/000-default.conf and add the forced https. However, after this process at some point the file added or uncommented ServerName MYDOMAIN.COM, which I have once again commented out, not that it makes a difference either way.
I am all new to Apache, the Pi and the whole shabang, but any help would be much appreciated. I want to very much stress this whole questions is about curiosity and a more elegant solution as I technically can access everything from within my own network, just not using the domain I assigned to the server.
Thanks so much for any advice!