FreePBX Web Gui Domain Name

Hi Everyone,

hope you’re doing well.

I recently setup a new Asterisk/Free PBX server (Asterisk 18.12.1 and FreePBX 16.0.19) to replace an internal system that was being used. Using setup located here: [computingforgeeks dot com/how-to-install-with-freepbx-on-ubuntu]

However I’ve come up with an issue whereby the FreePBX Web GUI can’t be accessed via domain of the server (it has the correct A record). It can only be accessed via the IP address of the server.

For obvious reasons, accessing the server via it’s IP address is not a good move security wise, as this server is accessible over the internet. (appropriate security measures have been taken)

I’m hoping someone here can give me a clue as to what to do.
Sorry if this is a dumb question, but I’ve been racking my brain over this for far too long.

Thanks in advance.

Why is it not a good move to access your server via IP address? Does the name resolution work (try nslookup)? If you’re trying to access it from the internet and you’re behind a NAT, do you have a port forwarding enabled?

I am afraid that OP is misunderstanding the concept of WAN access/port forwarding/A records etc.

In order to access your PBX via the domain, you have to point it to an IP address that reaches the PBX.

Hi,

Thanks for your replies, however the domain is already pointing towards the IP of the server, the server is also not behind a NAT.

The reason I mentioned it wasn’t best to access it security wise is due to logging into the web interface via IP without an SSL certificate, which I cannot generate a recognised certificate for, using something like let’s encrypt.

The domain and it’s records are not the issue, it is the actual web server aspect of free PBX not recognizing the domain.

The response received when trying to reach the web gui via domain is:

This site can’t be reached
(FREEPBXDOMAIN) refused to connect.
Try:

Checking the connection
ERR_CONNECTION_REFUSED

But it can be accessed using its IP address

The result of an ns lookup correctly shows the A record for the IP address of the server

The correct ports have been setup, and I do know understand the concept of WAN access, port forwarding and A records.

Connection refused is something that can only happen at the IP address level. The presence or absence of a domain name is irrelevant.

Hi,

If that were the case I wouldn’t be able to access the server using its IP address at all.
Please see attached screenshots with redacted domain and IP.


So you can access the first page via fqdn but when you try to log in you then get an error?

Also, is there a particular reason for doing it that way rather than using the default ISO?

I see.

OP tried to access voip.domain.com which resolves to 1.2.3.4.

When he goes to 1.2.3.4 he can access the PBX GUI, when he goes to voip.domain.com he can’t reach it.

It looks to me that either the apache config got messed up on the PBX, or there’s something (proxy/firewall) blocking it.

2 Likes

Yes exactly,

Can you point me to the correct Apache config as it does not appear to be in the usual location.

I’m using a VPS where I can’t use a custom appliance or OS, hence the use of Ubuntu with asterisk and freepbx on top.

The firewall is not blocking access to port 80/8080/443/8443

No proxy enabled either

I have never installed FreePBX on Ubuntu, so I don’t know…

Look at the apache logs for clues.

Same, I’m not an Ubuntu expert. It would be worth looking at alternative VPS providers that have either the option to upload an ISO or one that has a prebuilt FreePBX image for one click installs.

For giggles try prefixing the domain with http:// and NOT https://

1 Like

Looks like an ass-halved redirect from http to https, ideally only calls to your http://f.q.d.n should be forwarded to https, there should be no server (landing point) listening on ip.addre.ss:443

Hi,

Just wanted to update on the issue I was having.

So, I was using a .app domain name, and chrome wont display these sites without an SSL Certificate.

Upon realising this, I changed the domain.

Now I am able to access the VoIP server via it’s domain.

The issue was not related to A records, WAN, NAT, messed up configurations.

The next issue I faced was the installation of an SSL Certificate, as from multiple attempts, the cert manager within the Free PBX GUI doesn’t work for the kind of setup I have.

A good solution I found for this is here: Force https - #7 by threehappypenguins

Whilst I appreciate the fact this forum does not support setups outside of the official distro, it is common for people and organisations to use a base Linux distro such as Debian, and then build on top of this.

Regardless, I appreciate the responses.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.