Can only reach Apache test page with fqdn

Forum for questions and support relating to the 1.32.x releases only.
Post Reply
SomeGuy
Posts: 5
Joined: Wed Aug 21, 2019 10:59 pm

Can only reach Apache test page with fqdn

Post by SomeGuy »

I have zoneminder running in a vm and can reach it on the local network using its private 10.x.x.x/zm address. I installed certs for a fqdn at mydomain.com in the ssl.conf file, forwarded port 443 and tried to reach it. The problem is that I can only access mydomain.com not mydomain.com/zm. And reaching mydomain.com only gives me the apache test page.

In nextcloud there is a line in one of the conf files to tell it to accept other domains besides its local IP address, I could not find something similar in any of the conf files for zoneminder. I am sure I just missed the line somewhere to set this.

Zoneminder 1.32.2 installed in its own vm
Fedora 27(I know its EOL but I wont mess with it until I fix this)
standard LAMP config

I show httpd and zoneminder as running with no errors and like I said, I can reach the site at the local 10.x.x.x/zm just fine.

Thanks
lbm
Posts: 87
Joined: Mon Mar 26, 2018 7:44 pm

Re: Can only reach Apache test page with fqdn

Post by lbm »

Sorry, I have a little hard understanding your setup, but..

Have you tried, to change an host file, on a local computer, so the fqdn, points to internal ip, to see if this works ?
It might help narrow down the issue, where the problem is.

like
10.0.0.10 mydomain.com
SomeGuy
Posts: 5
Joined: Wed Aug 21, 2019 10:59 pm

Re: Can only reach Apache test page with fqdn

Post by SomeGuy »

Sorry for the confusion.

The DNS of the WAN IP is updated to mydomain.com.

Certificate files are installed in the zoneminder vm and declared in the zoneminder vm's ssl.conf file.

Port 443 is forwarded from the WAN to the zoneminder vm.



I can reach the zoneminder vm from an external nextwork via mydomain.com, but only to the apache test page.

When I type in mydomain.com/zm I get an error that the url could not be reached.

From an internal network if I type in the zoneminder vm's address of 10.x.x.x I get the apache test page.

If I enter 10.x.x.x/zm from the internal network I can configure and use zoneminder as normal.



I have nextcloud installed and functioning in a similar way(in a seperate vm on the same machine), but there is a line in nextcloud's config.php file where you can add mydomain.com to a trusted domain list (along with its internal ip of 10.x.x.x, or anything else you desire). Without declaring mydomain.com as a trusted domain for nextcloud the same problem I am having with zoneminder will occur.

I could not find a similar entry in any of the zoneminder files.

I tried declaring mydomain.com as a servername in the apache global config and the virtual host but after restarting apache this had no effect.

My goal is to use the ssl certs I have for mydomain.com to access zoneminder with https via mydomain.com/zm(or whatever)

I hope this is clearer, Ive tried to fiddle with it a few times now but I am stuck.
jbnsec
Posts: 3
Joined: Thu Aug 22, 2019 12:39 am

Re: Can only reach Apache test page with fqdn

Post by jbnsec »

I would suggest making sure your Apache logs are separate for the ssl and non-ssl versions in the site config files (like 000-default.conf and default-ssl.conf if you are using those), then check what the log files say for each when successfully accessing the site directly via internal IP and externally when you receive the error, both ssl and clearnet.

Code: Select all

                ErrorLog ${APACHE_LOG_DIR}/ssl-error.log
                CustomLog ${APACHE_LOG_DIR}/ssl-access.log combined
JB
rockedge
Posts: 1173
Joined: Fri Apr 04, 2014 1:46 pm
Location: Connecticut,USA

Re: Can only reach Apache test page with fqdn

Post by rockedge »

we must look at:
/etc/apache2/sites-available
/etc/apache2/sites-enabled
/etc/apache2/ports.conf
and the rest of the virtual host configs you have
Post Reply