You are not logged in.

#1 2022-09-14 14:00:08

mauricefh
Member
Registered: 2022-09-13
Posts: 6

[Solved] Apache localhost not accessible

Hi everyone i recently install a LAMP stack using the following guide https://www.linuxshelltips.com/install-lamp-archlinux/

But for some reason i can't access localhost, I get the following message This site can’t be reached

What it tried: Restart the service, Restart the computer

Here is the result of systemctl status httpd

× httpd.service - Apache Web Server
     Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2022-09-14 09:48:39 EDT; 8min ago
   Duration: 64ms
    Process: 459 ExecStart=/usr/bin/httpd -k start -DFOREGROUND (code=exited, status=1/FAILURE)
   Main PID: 459 (code=exited, status=1/FAILURE)
        CPU: 20ms

Sep 14 09:48:39 archlinux systemd[1]: Started Apache Web Server.
Sep 14 09:48:39 archlinux httpd[459]: AH00534: httpd: Configuration error: More than one MPM loaded.
Sep 14 09:48:39 archlinux systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Sep 14 09:48:39 archlinux systemd[1]: httpd.service: Failed with result 'exit-code'.

Here is the log file of httpd

AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::e1ad:4145:2b7d:c4d6%wlan0. Set the 'ServerName' directive globally to suppress this message
[Wed Sep 14 09:25:22.730741 2022] [mpm_event:notice] [pid 11252:tid 139643559619712] AH00489: Apache/2.4.54 (Unix) configured -- resuming normal operations
[Wed Sep 14 09:25:22.730786 2022] [core:notice] [pid 11252:tid 139643559619712] AH00094: Command line: '/usr/bin/httpd -D FOREGROUND'
[Wed Sep 14 09:39:00.899562 2022] [mpm_event:notice] [pid 11252:tid 139643559619712] AH00491: caught SIGTERM, shutting down

Also sudo dmesg | grep httpd return this

[ 1035.461975] audit: type=1130 audit(1663164351.451:135): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1035.508272] audit: type=1131 audit(1663164351.498:136): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=httpd comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Last edited by mauricefh (2022-09-14 15:02:33)

Offline

#2 2022-09-14 15:02:20

mauricefh
Member
Registered: 2022-09-13
Posts: 6

Re: [Solved] Apache localhost not accessible

Hey For anyone running into the same issue, make sure you only have one MPM line enabled in the httpd config file

sudo gedit /etc/httpd/conf/httpd.conf

Check that only one MPM line is uncommented
Then restart the service
systemctl restart httpd.service 
systemctl status httpd.service

Offline

Board footer

Powered by FluxBB