Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

My httpd.conf is empty

Tags:

apache

ubuntu

I recently installed apache2 on ubuntu but I have a problem, my httpd.conf is empty. Can someone give me a clean copy of httpd.conf for apache2 on ubuntu? Thanks!

Edit: I saw your answers but on wampserver httpd.conf is not empty and as you mentioned it is for user options. SO what should I do?

Edit2 : That's what I got on my apache2.conf, how I add modules, enable gzip and all of that?

[Deleted the contents, as they render the question unreadable and are useless, because that were the default Apache2 configuration under Ubuntu.]

like image 595
Yehonatan Avatar asked Jul 27 '12 11:07

Yehonatan


People also ask

How do I get to httpd conf?

All the configuration files for Apache are located in /etc/httpd/conf and /etc/httpd/conf. d . The data for websites you'll run with Apache is located in /var/www by default, but you can change that if you want.

Where is httpd conf stored?

If you installed httpd from source, the default location of the configuration files is /usr/local/apache2/conf . The default configuration file is usually called httpd. conf .


1 Answers

The /etc/apache2/httpd.conf is empty in Ubuntu, because the Apache configuration resides in /etc/apache2/apache2.conf!

“httpd.conf is for user options.” No it isn't, it's there for historic reasons.

Using Apache server, all user options should go into a new *.conf-file inside /etc/apache2/conf.d/. This method should be "update-safe", as httpd.conf or apache2.conf may get overwritten on the next server update.

Inside /etc/apache2/apache2.conf, you will find the following line, which includes those files:

# Include generic snippets of statements Include conf.d/ 

As of Apache 2.4+ the user configuration directory is /etc/apache2/conf-available/. Use a2enconf FILENAME_WITHOUT_SUFFIX to enable the new configuration file or manually create a symlink in /etc/apache2/conf-enabled/. Be aware that as of Apache 2.4 the configuration files must have the suffix .conf (e.g. conf-available/my-settings.conf);

like image 83
feeela Avatar answered Sep 29 '22 01:09

feeela