Access UCP Outside Lan -- No Sys Admin Module

I am currently running FPBX 14 and Asterisk 16 on a cloud VM

Would like to provide my users access over HTTPS to their VMs using UCP – however most of the solutions that are noted on the board refer to using the Sys Admin module which i do not have

How can this be done without that module?

thanks,

Are you running the Distro?

I am not

Then you cannot activate your system. If you cannot activate your system you cannot run or install any module that is noted as “Commercial” whether it is free or not. So no System Admin. The UCP runs on port 81, if people want to access it outside the LAN you need to setup port forwarding in your firewall for them to access the box. If the box is on a public IP, then they need to hit the IP on port 81.

Port 81 does not appear to be open / working on my box?

when i tried to connect to it – the webpage times out

where can i check to make sure UCP is open and running on 81?

Did you install the UCP module? When you do a custom install, it’s a basic install. You need to install all the modules you want to use.

Yes I did

If i go to http://x.x.x.x/ucp/ – ucp comes up fine

If i go to http://x.x.x.x:81 – i get nothing

thanks,

That’s the redirect. Just use the /ucp if you can. Im not sure what issue you are actually having. If you have UCP installed and you can access it without issue, then just give users access.

Ucp does not run in Port 81. It’s just a folder in the normal we root.

Are you sure? Did that change?

Also according to Apache it’s listening on 81 for the UCP

Starting ucp

ucp

Listen 81
<VirtualHost *:81>
Alias /.well-known /var/www/html/.well-known
Alias /.freepbx-known /var/www/html/.freepbx-known
RewriteEngine on
RewriteRule ^/.(well-known|freepbx-known)/ - [H=text/plain,L]
RewriteRule (^.|/.) - [F]
DocumentRoot /var/www/html/ucp/

Updated Followup: However, I see you’re point. This is a manual install so Apache by default would get /ucp due to it being a sub-directory and the port alias are probably not there due to that being a distro based conf file.

You are looking at sysadmin again but talking to someone who does not have the sys admin module.

Since I wrote UCP I’m sure.

Stop referencing Sysadmin in this post that is not about sysadmin

The UCP folder lives under the webroot. So if you normally access your system through http:///admin then ucp would be under http:///ucp. FreePBX does not modify Apache outside of the distro

See my update to my reply as I totally see the point you made. Probably happened while you where replying as well.

1 Like

You posted apache rules so if the user so desired they could do post that into their apache config and it’d work for them on port 81.

1 Like

True dat.

My issue is that i am running my PBX on a public IP and only want to open port 81 and then point that to UCP only and not the admin interface

From what i am reading it looks like i need to modify my apache config to accomplish that goal

can you please specify what i need to add exactly to make this happen – also is there a way to add HTTPS access as well instead of just HTTP access

thanks so much

I tried adding this to my httpd.conf file in the listen section with no success

Listen 81

<VirtualHost *:81>
Alias /.well-known /var/www/html/.well-known
Alias /.freepbx-known /var/www/html/.freepbx-known
RewriteEngine on
RewriteRule ^/.(well-known|freepbx-known)/ - [H=text/plain,L]
RewriteRule (^.|/.) - [F]
DocumentRoot /var/www/html/ucp/

thanks,

Any assistance or guidance in getting this done would be very much appreciated

Thanks

Little confused here , you are trying to massage

/var/www/html/.well-known

and

/var/www/html/.freepbx-known

do these 'documentroot’s actually exist in your machine?

You might better work with

/var/www/html/ucp

because that is likely the ‘documentroot’ you want and likely exists :wink:

The aliases he’s trying to set up aren’t really documentroots, but the point is well worth discussing.

@hardcop You can’t just copy and paste things from the Internet and hope they work. You need to understand what and why you are doing. This is another excellent example. You need to make sure the files you are trying to alias actually exist, otherwise the aliases are guaranteed not to work.

Agree – my mistake with the blind copy and paste –

In /var/www/html i have the following files/ folders:

admin
restapi
ucp (shortcut folder)
index.php
robots.txt

so i edited the text to read as below – but i must be missing something basic or simple here since i still can not see UCP on port 81

This is what i edited the httpd file to read:

Listen *:80

Listen *:81

<VirtualHost *:81>
ServerName xxx.xxx.com
DocumentRoot “/var/www/html/ucp”

Can you please guide me here – or point me in the right direction

Again really appreciate you teaching me how to make this right

thanks