Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does Apache install httpd.conf by default?

I thought Apache's httpd.conf is typically located at /etc/httpd/conf/httpd.conf. But for my installation as described below on Centos 6.4, it is located at /usr/local/apache2/conf/httpd.conf. On top of that, DocumentRoot is set to /usr/local/apache2/htdocs instead of the traditional /var/www/html.

Where is the most common location for these to be located? If different than what I am showing, what did I do wrong? Thank you

First I did the following:

  1. Unpack Apache 2.4.4 to /usr/local/src
  2. Unpack APR 1.4.6 to /usr/local/src/httpd-2.4.4/srclib/apr
  3. Unpack APR-Util 1.5.2 to /usr/local/src/httpd-2.4.4/srclib /apr-util
  4. Unpack PCRE 8.33 to /usr/local/src

Then I did the following

$ cd /usr/local/src/httpd-2.4.4/srclib/apr
$ ./configure
$ make
$ make install
$ cd /usr/local/src/httpd-2.4.4/srclib/ apr-util
$ ./configure --with-apr=../apr (verify if any other options are desired)
$ make 
$ make install 
$ cd /usr/local/src/pcre-8.33
$ ./configure
$ make 
$ make install 
$ cd /usr/local/src/httpd-2.4.4
$ ./configure --enable-so –enable-rewrite –enable-ssl –with-pcre
$ make 
$ make install 
like image 638
user1032531 Avatar asked Jun 16 '13 13:06

user1032531


People also ask

Where can I find the Apache httpd configuration files?

Depending on the distribution on which you have the Apache server installed, the location of the httpd.conf will vary. On Debian systems (apache2), the location of the Apache configuration is: On Fedora/CentOS and other REHL systems, the Apache configuration is in: Other locations you can check for the apache httpd configuration files are:

What is the default configuration for Apache server?

The installdir/apache2/conf/httpd.conf file contains the configuration of the Apache server. By default, it will load additional configurations from the following locations: The installdir/apache2/conf/bitnami/bitnami.conf file defines the main virtual host that will be used by the Apache Web server to respond to HTTP requests.

Where is Apache configuration file in Linux?

Apache configuration files are usually located in /etc/apache2/httpd on most systems with a package manager installed or when Apache was downloaded and installed from the web. conf. You can find /etc/apache2/apache2. Where Is Apache Directory On Linux?

Can I install the Apache HTTP server on Windows?

This document covers compilation and installation of the Apache HTTP Server on Unix and Unix-like systems only. For compiling and installation on Windows, see Using Apache HTTP Server with Microsoft Windows and Compiling Apache for Microsoft Windows .


1 Answers

What you did "wrong" was to not read the documentation, which clearly states:

PREFIX must be replaced with the filesystem path under which the server should be installed. If PREFIX is not specified, it defaults to /usr/local/apache2.

However, I put "wrong" in quotes because I cannot find anything wrong with those directories. What's so bad about /usr/local?

like image 53
innaM Avatar answered Oct 29 '22 05:10

innaM