GUI access suddenly failed


(Ralph) #21

Thanks Igaetz,

Any suggestion as to how I repair?


(Lorne Gaetz) #22

No idea what’s wrong yet.


(Ralph) #23

can I provide further details

thanks


(Tom Ray) #24

Apache (web server) thinks that those services are already running and bound to those IPs so it can’t start because there’s nothing free to listen on. This could be due to another web server being installed on the system or that Apache has duplicates and is firing Listen *:80 more than once.

Do this and show the output: netstat -ltnp | grep :80 this will showing anything listening on a port that starts with :80.


(Ralph) #25

result

tcp6 0 0 :::8088 :::* LISTEN 2696/asterisk
tcp6 0 0 :::8089 :::* LISTEN 2696/asterisk
tcp6 0 0 :::8001 :::* LISTEN 25303/node /var/www
tcp6 0 0 :::8003 :::* LISTEN 25303/node /var/www


(Tom Ray) #26

Not a good sign. Nothing on IPv4 is listening only IPv6. Do:egrep -R "Listen" /etc/httpd/ and show the results.


(Ralph) #27

ok

/etc/httpd/conf/httpd.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or
/etc/httpd/conf/httpd.conf:# Change this to Listen on specific IP addresses as shown below to
/etc/httpd/conf/httpd.conf:#Listen 12.34.56.78:80
/etc/httpd/conf.d/ssl.conf:Listen 443
/etc/httpd/conf.d/schmoozecom.conf:Listen 8080
/etc/httpd/conf.d/schmoozecom.conf:Listen 80
/etc/httpd/conf.d/schmoozecom.conf:Listen 81
/etc/httpd/conf.d/schmoozecom.conf:Listen 83
/etc/httpd/conf.d/schmoozecom.conf:Listen 82
/etc/httpd/conf.d/schmoozecom.conf:Listen 84
/etc/httpd/conf.d/schmoozecom.conf:Listen 80
/etc/httpd/logs/access_log-20200426:161.35.68.124 - - [23/Apr/2020:21:09:28 +0000] “GET /Temporary_Listen_Addresses/SMSSERVICE HTTP/1.1” 403 239 “-” “Wget/1.19.4 (linux-gnu)”
Binary file /etc/httpd/modules/mod_heartmonitor.so matches
Binary file /etc/httpd/modules/mod_mpm_event.so matches
Binary file /etc/httpd/modules/mod_mpm_prefork.so matches
Binary file /etc/httpd/modules/mod_mpm_worker.so matches


(Tom Ray) #28

There’s you problem. You have TWO entries for listening on port 80, so that is part of the problem right there. Let’s take a look at that conf file, cat /etc/httpd/conf.d/schmoozecom.conf show it.


(Ralph) #29

ok

# Automatically Generated File - 1587045385
# {"acp":{"port":"8080","dir":"\/var\/www\/html"},"ucp":{"port":"81","dir":"\/var\/www\/html\/ucp\/"},"restapi":{"port":"83","dir":"\/var\/www\/html\/restapi\/"},"restapps":{"port":"82","dir":"\/var\/www\/html\/restapps\/"},"hpro":{"port":"84","dir":"\/tftpboot\/"},"leport":{"port":"80","dir":"\/invalid\/folder\/name"}}
# Do NOT edit this file as it is auto-generated
# Starting acp
# acp
Listen 8080
Listen 80
<VirtualHost *:8080>
  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
</VirtualHost>
# 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/
</VirtualHost>
# Starting restapi
<DirectoryMatch "^/var/www/html/restapi/rest.php">
  AllowOverride None
  <IfModule mod_authz_core.c>
    <FilesMatch "^rest.php$">
      Require all granted
    </FilesMatch>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    <FilesMatch "^rest.php$">
      Allow from all
    </FilesMatch>
    Deny from all
  </IfModule>
</DirectoryMatch>
<Directory "/var/www/html/restapi">
  DirectoryIndex rest.php
</Directory>
# restapi
Listen 83
<VirtualHost *:83>
  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/restapi/
</VirtualHost>
# Starting restapps
<DirectoryMatch "^/var/www/html/restapps/(applications\.php|image\.php|restapps\.php|sync\.php|.+\.zip)">
  AllowOverride None
  <IfModule mod_authz_core.c>
    <FilesMatch "^(applications\.php|image\.php|restapps\.php|sync\.php|.+\.zip)$">
      Require all granted
    </FilesMatch>
    Require all denied
  </IfModule>
  <IfModule !mod_authz_core.c>
    <FilesMatch "^(applications\.php|image\.php|restapps\.php|sync\.php|.+\.zip)$">
      Allow from all
    </FilesMatch>
    Deny from all
  </IfModule>
</DirectoryMatch>
<Directory "/var/www/html/restapps">
  DirectoryIndex applications.php
</Directory>
# restapps
Listen 82
<VirtualHost *:82>
  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/restapps/
</VirtualHost>
# Starting hpro
<Directory /tftpboot/>
  AllowOverride None
  <IfModule mod_authz_core.c>
    <FilesMatch "(^\.|.php$)">
      Require all denied
    </FilesMatch>
    Require all granted
  </IfModule>
  <IfModule !mod_authz_core.c>
    <FilesMatch "(^\.|.php$)">
      Deny from all
    </FilesMatch>
    Allow from all
  </IfModule>
</Directory>
# hpro
Listen 84
<VirtualHost *:84>
  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 /tftpboot/
</VirtualHost>
# Starting leport
# Warning - The directory '/invalid/folder/name' doesn't exist
# leport
Listen 80
<VirtualHost *:80>
  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 /invalid/folder/name
</VirtualHost>

(Tom Ray) #30

Well it seems that first virtual host entry has the extra “Listen 80” command. @lgaetz What module controls that? I can’t remember off the top of my head. Sounds like it needs to be reinstalled or triggered to regenerate the confs to see if that extra line goes away.


(Ralph) #31

I changed the port as instructed when I installed letsencrypt. It needs port 80 so I changed acp to 8080


(Lorne Gaetz) #32

Generated by System Admin, but this is a VERY common config and as far as I can recall, this is the only report of this. Edit the file and comment out the extra line, i.e.:

# Starting acp
# acp
Listen 8080
#Listen 80
<VirtualHost *:8080>

then restart apache.

Please provide system admin version, and note there is probably on in ssl.conf for 443 as well.


(Ralph) #33

thanks Igaetz
sorry but which file am I editing


(Tom Ray) #34

The same file I had you cat the contents of, /etc/httpd/conf.d/schmoozecom.conf


(Ralph) #35

yes I realised after I sent last message
access to gui success
admin version FreePBX 14.0.13.28
what about your ref to ssl.conf 443?

Many thanks for time and trouble


(Lorne Gaetz) #36

System Admin module version please.


(Ralph) #37

PBX Firmware:

12.7.6-2002-2.sng7

PBX Service Pack:

1.0.0.0


(Lorne Gaetz) #38

What is the output of:

fwconsole ma list | grep sysadmin

(Ralph) #39

sysadmin | 14.0.38.12 | Enabled | Commercial |


(Lorne Gaetz) #40

Hi @RalphGraham

We can see that the file was generated on 04/16/2020 so we need to know what version of sysadmin was installed at that time. Please provide the output of:

grep "sysadmin Updated to version"  /var/log/asterisk/freepbx.log*