Question

How to resolve this error in Linux Centos?

I have a Error in my Linus Server. When i will logon my domain on browser example.com it can show an error ERROR: Gateway Timeout I will use PuTTy on Computer Windows, when i login my root User and Enter My Password after given of this command, systemctl status httpd.service a error show. Error=>

● httpd.service - The Apache HTTP Server

Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)

Active: failed (Result: exit-code) since Mon 2017-07-10 00:04:01 PKT; 9h ago Docs: man:httpd(8)

man:apachectl(8)

Process: 40522 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited,

status=1/FAILURE)

Process: 40521 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited,

status=1/FAILURE)

Main PID: 40521 (code=exited, status=1/FAILURE)

Jul 10 00:04:01 example.com systemd[1]: Starting The Apache HTTP Server…

Jul 10 00:04:01 example.com httpd[40521]: (2)No such file or directory: A…1

Jul 10 00:04:01 example.com httpd[40521]: AH00014: Configuration check failed

Jul 10 00:04:01 example.com systemd[1]: httpd.service: main process exite…E

Jul 10 00:04:01 example.com kill[40522]: kill: cannot find process “”

Jul 10 00:04:01 example.com systemd[1]: httpd.service: control process ex…1

Jul 10 00:04:01 example.com systemd[1]: Failed to start The Apache HTTP S…

Jul 10 00:04:01 example.com systemd[1]: Unit httpd.service entered failed…

Jul 10 00:04:01 example.com systemd[1]: httpd.service failed.

Jul 10 03:19:01 example.com systemd[1]: Unit httpd.service cannot be relo…

Hint: Some lines were ellipsized, use -l to show in full.

Note: Example.com in above question is my primary domain name. I will not show my primary domain due to security reason. Thank you


Submit an answer


This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Accepted Answer

Hi @salmanafzal

It looks like there’s a configuration error somewhere in your Apache configs. Run this:

sudo apachectl configtest

Please post the last 30 lines from the Apache error log. Run this:

sudo tail -30 /var/log/apache2/error.log

This comment has been deleted

    Hi @hansen When i enter these command in PuTTy , an error show. =>sudo apachectl configtest Result: AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf/httpd.conf:355 (2)No such file or directory: AH02291: Cannot access directory ‘/var/www/subdomain.example.com/logs/’ for error log of vhost defined at /etc/httpd/conf.d/subdomain.example.com.conf:1 AH00014: Configuration check failed => sudo tail -30 /var/log/apache2/error.log Result: tail: cannot open ‘/var/log/apache2/error.log’ for reading: No such file or directory

    Kindly solve my issue please. What is error in my Linux Server?

    Try DigitalOcean for free

    Click below to sign up and get $200 of credit to try our products over 60 days!

    Sign up

    Get our biweekly newsletter

    Sign up for Infrastructure as a Newsletter.

    Hollie's Hub for Good

    Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

    Become a contributor

    Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

    Welcome to the developer cloud

    DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

    Learn more
    DigitalOcean Cloud Control Panel