0

Problem: The Moodle webpage stopped working with error message Secure Connection Failed (PR_END_OF_FILE_ERROR).

Server Details: VPS with root access running CentOS 7, Webmin (installed without LAMP), Webuzo (installed with LAMP). Two other apps are installed in Dockers and connected to Moodle.

Possible Reason for error: In Webuzo I edited php.ini to increase max_upload_filesize from 20M to 200M. Restarted the server from server homepage (not Webuzo). It gave error. I did shutdown the server and started again. Wala, website stopped working.

Some Attempts, Commands and outputs:
(1) The command service httpd status gives following error
service status
(2) The command find /usr/ -name httpd.conf gives this output

/usr/lib/tmpfiles.d/httpd.conf
/usr/local/webuzo/conf/webuzo/httpd.conf
/usr/local/apps/apache/etc/original/httpd.conf
/usr/local/apps/apache/etc/httpd.conf

I opened file in Webuzo directory, un-commented the line Listen 12.34.56.78:80 and changed IP with My IP. Next line Listen 80 was not commented, I left it that way, which didn't work, later commented it out but website still didn't work. There are two instances where it mentions 127.0.0.1 with same statements, given below (I did not change anything)

<Location /webuzo-server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 127.0.0.1 ::1 localhost

The command whereis httpd.conf gives a different set of directories.
(3) service webuzo restart (runs successfully)
(4) service httpd start or even restart (gives following error)

(98)Address already in use:make_sock: could not bind to address 0.0.00:80
no listening sockets available, shutting down
Unable to open logs

When I type my IP in browser, it displays Apache Test Page with message "This website is working properly".
(5) netsatat -ntlp (one line from the output is below)

tcp 0 0.0.0.0:80 0.0.0.0:* LISTEN 1034/httpd

(No other service is using port 80)
Thanks in advance.

1 Answers1

0

It is hard to nail with the current info, but let's try some things to that may shed some light to the problem.

I doubt that changing the max_upload_filesize is what is causing your problem, unless there is a typo on it, but then it would show a different error as well.

Seems to me that there are 2 things trying to use port 80.

  1. Did you try changing the ports on any or all the services? For example, change the Webuzo port from 80 to 8080 or 8000 or 9000 or whatever is free. Then try restarting all the services (both httpd and webuzo).
  2. Can you revert to the old config that was working and make a diff with the new one?

Since you have many config files, it may be hard to track it down, but you can also search for all .conf files that have Listen 80 or VirtualHost *:80.

If all fails, I would also check for any .htaccess that may be causing the problem.

If changing the Webuzo port works, you will need to think on how you want to fix it.

  1. You could just run it on another port (not sure if it is viable).
  2. You could find the other "site" using port 80 and change its port as well, or even disable it if nor needed.
  3. Another option is to have both listening to port 80, but with virtualhosts set to listen to a specific domain.

EDIT More things to try

Test apache config

apachectl configtest   # OR
apache2ctl configtest

Also

httpd -t
Gus Neves
  • 121
  • 3