apache 2 does not install ubuntu 16.04 - apache

I am install apache2 ubuntu 16.04 .i am getting this error.
Job for apache2.service failed because the control process exited with error code. See "systemctl status apache2.service" and "journalctl -xe" for details.
invoke-rc.d: initscript apache2, action "start" failed.
● apache2.service - LSB: Apache2 web server
Loaded: loaded (/etc/init.d/apache2; bad; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Fri 2017-06-30 15:19:36 IST; 10ms ago
Docs: man:systemd-sysv-generator(8)
Process: 18460 ExecStart=/etc/init.d/apache2 start (code=exited, status=2)
Jun 30 15:19:36 shradha-Vostro-3546 systemd[1]: Starting LSB: Apache2 web se....
Jun 30 15:19:36 shradha-Vostro-3546 apache2[18460]: /etc/init.d/apache2: 46: ...
Jun 30 15:19:36 shradha-Vostro-3546 apache2[18460]: /etc/init.d/apache2: 57: ...
Jun 30 15:19:36 shradha-Vostro-3546 apache2[18460]: ERROR: APACHE_PID_FILE ne...
Jun 30 15:19:36 shradha-Vostro-3546 systemd[1]: apache2.service: Control pro...2
Jun 30 15:19:36 shradha-Vostro-3546 systemd[1]: Failed to start LSB: Apache2....
Jun 30 15:19:36 shradha-Vostro-3546 systemd[1]: apache2.service: Unit entere....
Jun 30 15:19:36 shradha-Vostro-3546 systemd[1]: apache2.service: Failed with....
please help me

Related

Failed to start The Apache HTTP Server After Update Directadmin

My webserver down and cant run it again After update Directadmin
[root#srv ~]# systemctl status httpd
● httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: signal) since Tue 2020-06-30 10:41:18 +0430; 1min 17s ago
Process: 1363 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=killed, signal=KILL)
Main PID: 1363 (code=killed, signal=KILL)
Jun 30 09:52:24 srv.shahriariboresh.ir systemd[1]: Starting The Apache HTTP Server...
Jun 30 10:41:13 srv.shahriariboresh.ir systemd[1]: httpd.service start operation timed out. Terminating.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: httpd.service stop-sigterm timed out. Killing.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: httpd.service: main process exited, code=killed, status=9/KILL
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: Failed to start The Apache HTTP Server.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: Unit httpd.service entered failed state.
Jun 30 10:41:18 srv.shahriariboresh.ir systemd[1]: httpd.service failed.
any body help me for solve this problem ?

How to solve error restarting apache Ubuntu

Question originally posted in Spanish, on es.stackoverflow.com, by mnsperez97:
I have a problem with the connection to Apache, after restarting it
with the sudo service apache2 restart command, I get this error
Job for apache2.service failed because the control process exited with
error code. See "systemctl status apache2.service" and "journalctl
-xe" for details.
and then when entering localhost it does not let me in and it makes me
worse, when I run sudo journalctl -xe he told me the following but
still I do not find the error, if you could help me I would be very
grateful
EDIT: run the systemctl status apache2.service command and this
appears to me
apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
└─apache2-systemd.conf
Active: failed (Result: exit-code) since Thu 2019-10-17 12:20:34 -04; 29min ago
Process: 21198 ExecStop=/usr/sbin/apachectl stop (code=exited, status=1/FAILURE)
Process: 7385 ExecReload=/usr/sbin/apachectl graceful (code=exited, status=0/SUCCESS)
Process: 23453 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Main PID: 1059 (code=exited, status=0/SUCCESS)
oct 17 12:20:34 pcarrasco systemd[1]: Starting The Apache HTTP Server...
oct 17 12:20:34 pcarrasco apachectl[23453]: AH00526: Syntax error on line 47 of /etc/apache2/sites-enabled/cms.local.conf:
oct 17 12:20:34 pcarrasco apachectl[23453]: order takes one argument, 'allow,deny', 'deny,allow', or 'mutual-failure'
oct 17 12:20:34 pcarrasco apachectl[23453]: Action 'start' failed.
oct 17 12:20:34 pcarrasco apachectl[23453]: The Apache error log may have more information.
oct 17 12:20:34 pcarrasco systemd[1]: apache2.service: Control process exited, code=exited status=1
oct 17 12:20:34 pcarrasco systemd[1]: apache2.service: Failed with result 'exit-code'.
oct 17 12:20:34 pcarrasco systemd[1]: Failed to start The Apache HTTP Server.
This is common due to problems in your configuration
it may be the port configuration
lock at the log file (pass can be found as ErrorLog in /etc/httpd/conf/httpd.conf)
or try to undo what you changed in the configuration files till you find the problem

Not able to start Apache

Not able to start apache. Giving the below error.
Could some one please help me on this?
Error message:
ip-10-128-9-27 httpd-scl-wrapper: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-ssl.conf: Cannot load modules/mod_ssl.so into server: /lib64/libcrypto.so.10: version `OPENSSL_1.0.2' not found (required by /opt/rh/httpd24/root/etc/httpd/modules/mod_ssl.so)
Below is the detailed error message.
[root#ip-10-128-9-27 centos]# systemctl status httpd24-httpd.service
● httpd24-httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd24-httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Thu 2017-12-07 12:34:05 UTC; 12s ago
Process: 29020 ExecStop=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -k graceful-stop (code=exited, status=1/FAILURE)
Process: 29018 ExecStart=/opt/rh/httpd24/root/usr/sbin/httpd-scl-wrapper $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 29018 (code=exited, status=1/FAILURE)
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: Starting The Apache HTTP Server...
Dec 07 12:34:05 ip-10-128-9-27 httpd-scl-wrapper[29018]: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-ssl.conf...
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: httpd24-httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 07 12:34:05 ip-10-128-9-27 httpd-scl-wrapper[29020]: httpd: Syntax error on line 56 of /opt/rh/httpd24/root/etc/httpd/conf/httpd.conf: Syntax error on line 1 of /opt/rh/httpd24/root/etc/httpd/conf.modules.d/00-ssl.conf...
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: httpd24-httpd.service: control process exited, code=exited status=1
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: Failed to start The Apache HTTP Server.
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: Unit httpd24-httpd.service entered failed state.
Dec 07 12:34:05 ip-10-128-9-27 systemd[1]: httpd24-httpd.service failed.

Apache startup failure - Centos7

I ran a yum update after which HTTP Apache server fails to start up on my Centos 7 VM.
The apache details - Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips PHP/5.4.16
Kernel version - 3.10.0-327.10.1.el7.x86_64
Here is what the systemctl shows. I'm not able to figure out what is broken after the update.
[root#localhost log]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2016-02-26 16:32:37 NZDT; 4min 19s ago
Docs: man:httpd(8)
man:apachectl(8)
Process: 3654 ExecStopPost=/usr/bin/kdestroy -A (code=exited, status=0/SUCCESS)
Process: 3651 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 3649 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Process: 3574 ExecStartPre=/usr/libexec/ipa/ipa-httpd-kdcproxy (code=exited, status=0/SUCCESS)
Main PID: 3649 (code=exited, status=1/FAILURE)
Feb 26 16:32:37 localhost.localdomain ipa-httpd-kdcproxy[3574]: ipa : WARNING Disabling KDC proxy
Feb 26 16:32:37 localhost.localdomain httpd[3649]: [Fri Feb 26 16:32:37.213684 2016] [so:warn] [pid 3649] AH01574: module rewrite_module is already loaded, skipping
Feb 26 16:32:37 localhost.localdomain httpd[3649]: [Fri Feb 26 16:32:37.217181 2016] [so:warn] [pid 3649] AH01574: module ssl_module is already loaded, skipping
Feb 26 16:32:37 localhost.localdomain httpd[3649]: AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' directi... this message
Feb 26 16:32:37 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Feb 26 16:32:37 localhost.localdomain kill[3651]: kill: cannot find process ""
Feb 26 16:32:37 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1
Feb 26 16:32:37 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server.
Feb 26 16:32:37 localhost.localdomain systemd[1]: Unit httpd.service entered failed state.
Feb 26 16:32:37 localhost.localdomain systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
Could I please request help to get some pointers to dig further or anyone who has seen this before & knows how to fix please?
it was happened to me when i install/uninstall free-ipa, because of which nss.conf has been created inside /etc/httpd/conf.d/nss.conf, you can give a try by just moving this file to another directory as i did, now httpd service is working like a charm.
Can you please setup the correct hostname for your server and check " journalctl -xn " command out while restarting httpd services on yoru server, You will get exact root cause of your httpd issues with journalctl -xn command.

CentOS 7 apachectl httpd.service fails to start

I'm building https://github.com/devopsgroup-io/catapult-release-management and every once in a while trying to apachectl start an error of:
Job for httpd.service failed. See 'systemctl status httpd.service' and 'journalctl -xn' for details.
systemctl status httpd.service outputs:
httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled)
Active: failed (Result: exit-code) since Wed 2015-07-15 19:25:23 EDT; 4s ago
Process: 3247 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
Process: 3246 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 3246 (code=exited, status=1/FAILURE)
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Starting The Apache HTTP Server...
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 15 19:25:23 devopsgroup.io-dev-redhat kill[3247]: kill: cannot find process ""
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Failed to start The Apache HTTP Server.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Unit httpd.service entered failed state.
and journalctl -xn outputs:
-- Logs begin at Wed 2015-07-15 19:23:53 EDT, end at Wed 2015-07-15 19:25:23 EDT. --
Jul 15 19:25:11 devopsgroup.io-dev-redhat sshd[3196]: pam_unix(sshd:session): session opened for user vagrant by (uid=0)
Jul 15 19:25:17 devopsgroup.io-dev-redhat sudo[3221]: vagrant : TTY=pts/0 ; PWD=/home/vagrant ; USER=root ; COMMAND=/bin/su -l
Jul 15 19:25:17 devopsgroup.io-dev-redhat su[3222]: (to root) vagrant on pts/0
Jul 15 19:25:17 devopsgroup.io-dev-redhat su[3222]: pam_unix(su-l:session): session opened for user root by vagrant(uid=0)
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Starting The Apache HTTP Server...
-- Subject: Unit httpd.service has begun with start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has begun starting up.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Jul 15 19:25:23 devopsgroup.io-dev-redhat kill[3247]: kill: cannot find process ""
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: httpd.service: control process exited, code=exited status=1
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Failed to start The Apache HTTP Server.
-- Subject: Unit httpd.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit httpd.service has failed.
--
-- The result is failed.
Jul 15 19:25:23 devopsgroup.io-dev-redhat systemd[1]: Unit httpd.service entered failed state.
Any ideas?
This was due to /etc/httpd/conf/httpd.conf being appended with more than 20 duplicate lines of IncludeOptional sites-enabled/*.conf
This is a bug in apachectl configtest as it reports correct configuration and does not provide a traceable error.