View previous topic :: View next topic |
Author |
Message |
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Sun Nov 13, 2022 3:21 am Post subject: [SOLVED] unable to start apache server |
|
|
hi guys how are you doing, i am trying to setup LAMP on my machine, it is under hardened/selinux profile.
i installed php, mariadb successfully apache is installed successfully as well, however when i try to execute
Code: | /etc/init.d/apache2 start | as root i keep getting errors about missing modules so i added the missing modules. however now when i want to run Code: | /etc/init.d/apache2 start | after making sure all the modules are installed, i get this error
Code: | apache2: Syntax error on line 153 of /etc/apache2/httpd.conf: Cannot load modules/mod_proxy_http2.so into server: /usr/lib64/apache2/modules/mod_proxy_http2.so: undefined symbol: ap_proxy_location_reverse_map
apache2 | * ERROR: apache2 failed to start
|
for checking if it works by opening localhost on the host machine, it does not work, i cannot open that page whether on firefox or chromium browsers
please help me guys, thank you _________________ i would like to thank everyone that contributed to the gentoo project in any means
Last edited by abdus on Sat Nov 19, 2022 11:33 am; edited 1 time in total |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Sun Nov 13, 2022 6:03 am Post subject: |
|
|
the verbose output of the error is Code: |
apache2 |apache2 | * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/apache2 start
apache2 | * Starting apache2 ...
apache2 | * start-stop-daemon: fopen `/var/run/apache2.pid': No such file or directory
apache2 | * Detaching to start `/usr/sbin/apache2' ...
apache2 | * start-stop-daemon: failed to start `/usr/sbin/apache2' [ !! ]
apache2 | * ERROR: apache2 failed to start
|
_________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Sun Nov 13, 2022 4:51 pm Post subject: |
|
|
What is the output of namei -l /run /var/run? You should have: Code: | $ namei -l /run /var/run
f: /run
drwxr-xr-x root root /
drwxr-xr-x root root run
f: /var/run
drwxr-xr-x root root /
drwxr-xr-x root root var
lrwxrwxrwx root root run -> /run
drwxr-xr-x root root /
drwxr-xr-x root root run |
|
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Sun Nov 13, 2022 5:39 pm Post subject: |
|
|
the output is just like yours _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Sun Nov 13, 2022 6:28 pm Post subject: |
|
|
That suggests the diagnostic about the pidfile is not relevant. What is written to the Apache logs when it fails to start? |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Mon Nov 14, 2022 2:06 am Post subject: |
|
|
where to find the log?? _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Mon Nov 14, 2022 12:29 pm Post subject: |
|
|
Maybe this helps:
https://ocroquette.wordpress.com/2018/04/30/apache-undefined-symbol-ap_proxy_location_reverse_map/
Greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Mon Nov 14, 2022 1:15 pm Post subject: |
|
|
thank you for your help but for the error of "syntax error" i just followed the thread above and i only had to comment the lines that start those modules. now i have the error
Code: | apache2 |apache2 | * Executing: /lib/rc/sh/openrc-run.sh /lib/rc/sh/openrc-run.sh /etc/init.d/apache2 start
apache2 | * Starting apache2 ...
apache2 | * start-stop-daemon: fopen `/var/run/apache2.pid': No such file or directory
apache2 | * Detaching to start `/usr/sbin/apache2' ...
apache2 | * start-stop-daemon: failed to start `/usr/sbin/apache2'
|
_________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Mon Nov 14, 2022 8:43 pm Post subject: |
|
|
then as Hu already wrote; check the logfiles.
greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Tue Nov 15, 2022 3:49 am Post subject: |
|
|
the log file is supposed to be "access.log" when executing the command locate access.log, i get no output.
locate command is supposed to work well with me, i made sure it does _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
hdcg Tux's lil' helper
Joined: 07 Apr 2013 Posts: 121
|
Posted: Tue Nov 15, 2022 5:05 am Post subject: |
|
|
Hi abdus,
assuming you did not change the default log configuration.
The log file of interest will be:
Code: | /var/log/apache2/error_log |
as Apache is not able to start. The access log
Code: | /var/log/apache2/access_log |
will only be written after Apache is running and accepting requests.
Best Regards,
Holger |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Tue Nov 15, 2022 5:51 am Post subject: |
|
|
thank you very much for the info
the output file is here https://dpaste.com/4NHESALRH
it says the module mod_request needs to be loaded _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Tue Nov 15, 2022 6:05 am Post subject: |
|
|
where can i find that module? it isn't listed in APACHE2_MODULES when i want to reemerge apache package _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 23062
|
Posted: Tue Nov 15, 2022 1:30 pm Post subject: |
|
|
Some modules may be available by default, and not subject to a Portage configuration flag. Was mod_request.so built for you? It is for me: Code: | /usr/lib64/apache2/modules/mod_request.so | However, even if it is installed, it may not be enabled in your Apache configuration. You could also choose to disable use of mod_auth_form so that you do not need mod_request. |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Tue Nov 15, 2022 9:07 pm Post subject: |
|
|
Hu wrote: | Some modules may be available by default, and not subject to a Portage configuration flag. Was mod_request.so built for you? It is for me: Code: | /usr/lib64/apache2/modules/mod_request.so | However, even if it is installed, it may not be enabled in your Apache configuration. You could also choose to disable use of mod_auth_form so that you do not need mod_request. |
copy that, and usually "a2enmod" and "a2dismod" should help you in this case as well.
greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
grknight Retired Dev
Joined: 20 Feb 2015 Posts: 1999
|
Posted: Tue Nov 15, 2022 9:12 pm Post subject: |
|
|
bbgermany wrote: | Hu wrote: | Some modules may be available by default, and not subject to a Portage configuration flag. Was mod_request.so built for you? It is for me: Code: | /usr/lib64/apache2/modules/mod_request.so | However, even if it is installed, it may not be enabled in your Apache configuration. You could also choose to disable use of mod_auth_form so that you do not need mod_request. |
copy that, and usually "a2enmod" and "a2dismod" should help you in this case as well.
|
Those 2 commands are a Debian specific addition. Normal configuration file editing is required on Gentoo. |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Wed Nov 16, 2022 9:04 pm Post subject: |
|
|
grknight wrote: | Those 2 commands are a Debian specific addition. Normal configuration file editing is required on Gentoo. |
OMG, how could i miss this. Im working with debian servers for too long already. Im sorry
greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Thu Nov 17, 2022 12:17 am Post subject: |
|
|
i put Code: | LoadModule request_module modules/mod_request.so | to /etc/apache2/httpd.conf
apache server did not want to start, i disabled mod_auth_form still not wanting to start
the new lines in error log are
Code: | [Thu Nov 17 07:09:39.752305 2022] [:notice] [pid 20869:tid 139940753247680] ModSecurity for Apache/2.9.5 (http://www.modsecurity.org/) configured.
[Thu Nov 17 07:09:39.752382 2022] [:notice] [pid 20869:tid 139940753247680] ModSecurity: APR compiled version="1.7.0"; loaded version="1.7.0"
[Thu Nov 17 07:09:39.752390 2022] [:notice] [pid 20869:tid 139940753247680] ModSecurity: PCRE compiled version="8.45 "; loaded version="8.45 2021-06-15"
[Thu Nov 17 07:09:39.752396 2022] [:notice] [pid 20869:tid 139940753247680] ModSecurity: LIBXML compiled version="2.10.2"
[Thu Nov 17 07:09:39.752400 2022] [:notice] [pid 20869:tid 139940753247680] ModSecurity: Status engine is currently disabled, enable it by set SecStatusEngine to On.
[Thu Nov 17 07:09:39.823091 2022] [lbmethod_bybusyness:emerg] [pid 20870:tid 139940753247680] AH10151: mod_proxy must be loaded for mod_lbmethod_bybusyness
[Thu Nov 17 07:09:39.823124 2022] [:emerg] [pid 20870:tid 139940753247680] AH00020: Configuration Failed, exiting
| i had not to use wgetpaste, it doesn't want to work, i'm sorry for that.
it says i need to load mod_proxy which is already uncommented in /etc/apache2/httpd.conf _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
bbgermany Veteran
Joined: 21 Feb 2005 Posts: 1844 Location: Oranienburg/Germany
|
Posted: Thu Nov 17, 2022 4:53 am Post subject: |
|
|
Hi,
did you see this line:
Code: |
[Thu Nov 17 07:09:39.823091 2022] [lbmethod_bybusyness:emerg] [pid 20870:tid 139940753247680] AH10151: mod_proxy must be loaded for mod_lbmethod_bybusyness
|
Enable mod_proxy or disable all the modules that are mentioned if you do not enable mod_proxy and retry.
greetings Stefan _________________ Desktop: Ryzen 5 5600G, 32GB, 2TB, RX7600
Notebook: Dell XPS 13 9370, 16GB, 1TB
Server #1: Ryzen 5 Pro 4650G, 64GB, 16.5TB
Server #2: Ryzen 4800H, 32GB, 22TB |
|
Back to top |
|
|
hdcg Tux's lil' helper
Joined: 07 Apr 2013 Posts: 121
|
Posted: Thu Nov 17, 2022 5:00 am Post subject: |
|
|
Hi abdus,
please check the config file in detail.
Per default mod_proxy is guarded by a define
Code: | <IfDefine PROXY>
LoadModule proxy_module modules/mod_proxy.so
</IfDefine> |
To enable mod_proxy with this config, add -D PROXY to /etc/conf.d/apache2. Like
Code: | APACHE2_OPTS="... -D PROXY ..." |
Do not remove the other already defined options.
Furthermore if you modify httpd.conf directly, make sure the module order matches. I am not quite sure, but your error may also occur if mod_proxy is loaded after the depending module.
Best Regards,
Holger |
|
Back to top |
|
|
abdus Apprentice
Joined: 10 Feb 2021 Posts: 190 Location: bandung
|
Posted: Sat Nov 19, 2022 11:32 am Post subject: |
|
|
i enabled the mod_proxy the way you said, it caused me to add some other modules since they are needed there was an erro saying that those modules are not found so i added them to APACHE2_MODULES , and it worked.
thank you very much for your help god bless you and bless this comunity.
i appreciate your help. see you _________________ i would like to thank everyone that contributed to the gentoo project in any means |
|
Back to top |
|
|
|