When I cd to /etc/apache2/ I can see two configuration files: apache2.conf and httpd.conf.

The apache.conf file has many configuration directives within (that makes me think it's the main configuration file)while the other (httpd.conf) has none(actually, it has just one that I added a while ago...namely ServerName localhost) .

Is this ok? Can I be sure that any changes made in the apache2.conf file will be effective?

Thanks in advance

  • 1
    Yeah you should be just fine...that seems exactly like what I had and it ran ok :)
    – zkriesse
    Jul 16 '11 at 21:48

The apache main configuration happens to apache2.conf. If you go thought the configuration file around line 207 you will realise it includes the httpd.conf.

This way you can make your custom configurations in the httd.conf without getting lost in the apache2.conf and you can keep your individual changes to your individual file.

It doesn't really matter where you write your configurations since both files are getting used.

In order to make sure it works sudo /etc/init.d/apache2 restart this will restart the Apache server.

  • 2
    And additionally (but, not asked) all files inside the conf.d-directory will be included too, which also allows to store individual settings there.
    – feeela
    Jul 17 '11 at 0:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.