Setup apache error

Posted April 18, 2014 4.5k views
I have just followed the instructions in this link: But my apache won't start, any idea why? Thank you.

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.

Submit an Answer
11 answers
Look at Apache's logs. Not sure where they are on Centos, probably in /var/log somewhere. There should be information on what's going on there.
@rascul Thank you.
The apache has now started but I am seeing Apache2 Test Page, Not the index.html that I have created in the link above. What could be the issue here?
Where do you have your index.html file placed?
@colin I have placed in /var/www/ just like as instructed in this link:

by Etel Sverdlov
This tutorial shows you how to set up a new directory, how to grant the correct permissions, how to add content to a new page, how to turn on virtual hosting, and how to, if needed, set up local hosts. Virtual Hosts are used to run more than one domain off of a single IP address and allows you to run multiple sites off of a single DigitalOcean droplet. This tutorial describes how to set up virtual hosts with Apache on Centos
Will you paste the contents of the vhosts section of your apache httpd.conf file.

What was the error thrown when apache didn't start? That may be a hint of something in your httpd.conf not properly set. How did you fix it to get apache to start?
Here is the vhosts section of the file:

NameVirtualHost *:80
# NOTE: NameVirtualHost cannot be used without a port specifier
# (e.g. :80) if mod_ssl is being used, due to the nature of the
# SSL protocol.

# VirtualHost example:
# Almost any Apache directive may go into a VirtualHost container.
# The first VirtualHost section is used for requests without a known
# server name.

DocumentRoot /var/www/
ErrorLog /var/www/
CustomLog /var/www/ common

The error is just with the url. Not big of a deal. Just missed it. Thank you for your help.
Make sure to surround your virtual host directives with


"The error is just with the url. Not big of a deal. Just missed it. Thank you for your help."

Do you have it working?
It looks like digital ocean is escaping what it thinks is html (please excuse the added spaces)

Surround your directives with

< VirtualHost *:80 >

< / VirtualHost *:80 >
Previous 1 2 Next