On Ubuntu, I am trying to get the
httpd.conf file for apache2. My server does not show one.
apache2.conf be the same as
Just did some more research on this (beyond my comment):
Ubuntu Docs: HTTPD - Apache2 Web Server
apache2.conf: the main Apache2 configuration file. Contains settings that are global to Apache2.
httpd.conf: historically the main Apache2 configuration file, named after the httpd daemon. The file can be used for user specific configuration options that globally effect Apache2.
So to echo @slhck - I would source the
httpd.conf from the
httpd.conf is empty (or nonexistent) in some distributions. If an
apache2.conf is present you should probably not edit this, but include your own
httpd.conf from the
apache2.conf. This is because
apache2.conf may be overwritten by package updates.
apache2.conf therefore should include this line. If it doesn't already, you can add it yourself:
/etc/apache2/conf.d is also a good place to put configuration files.
The sites-available method is generally considered the "Debian Way": • "main" config in /etc/apache2/apache2.conf • "user" config in /etc/apache2/httpd.conf • vhosts in /etc/apache2/sites-available files (one per file, typically) • you might want to number them, e.g. 00-domain.com, 01-otherdomain.com • ports (Listen directives) in /etc/apache2/ports.conf • mods in /etc/apache2/mods-available
You can manipulate these with symlinks or with the a2 series of commands: a2ensite/a2dissite a2enmod/a2dismod
Depending on personal preference, you can restart Apache using apachectl, /etc/init.d/apache2 (start|stop|reload|restart), or service apache2 (start|stop|reload|restart)
An example where you would use httpd.conf instead of a vhost entry would be for a global redirect or rewrite rule, for example. Other tidbits -- generally, you should leave apache2.conf alone, and make sure you set up a consistent naming scheme for vhosts in the sites-available directory.