Can't find httpd.conf

349,483

Solution 1

Ubuntu doesn't use httpd.conf as standard, instead global configuration stuff for apache is found in /etc/apache2/apache2.conf. You can create a httpd.conf in the apache2 directory, and load any further configuration from it by including the following line in /etc/apache2/apache2.conf.

Include /etc/apache2/httpd.conf

You don't need that file to configure apache, but you can create it if other software relies on it being there.

Solution 2

httpd.conf will be in /etc/apache2/.

/etc/apache2$ ls
apache2.conf  envvars     mods-available  ports.conf       sites-enabled
conf.d        httpd.conf  mods-enabled    sites-available
:/etc/apache2$ more httpd.conf
:/etc/apache2$

I need to change it

No, you do not. The documentation states:

httpd.conf: historically the main Apache2 configuration file, named after the httpd daemon. Now the file does not exist. In older versions of Ubuntu the file might be present, but empty, as all configuration options have been moved to the below referenced directories.

because when I try to open a .php page I see a download box

How would changing httpd.conf fix that? If you need config settings changed I would assume you need to alter apache2.conf or the virtual host in /etc/apache2/sites-enabled/.

Share:
349,483

Related videos on Youtube

fosslinux
Author by

fosslinux

Updated on September 18, 2022

Comments

  • fosslinux
    fosslinux over 1 year

    I have installed Ubuntu 14.04 on a laptop and installed apache 2 (version 2.4.7) and PHP 5.

    I cannot find httpd.conf. I need to change it because when I try to open a .php page I see a download box.

    How should I proceed?

    • Rinzwind
      Rinzwind almost 9 years
      I believe you are asking the wrong question. The question you should ask is "how do I prevent this download box from showing" + "see the image I added". If that would have "edit httpd.conf with..." as an answer ou'd have a good q and good a. Now you will get negative answers about httpd.conf where you have no interest in since you still have a download box ;)
  • ThunderBird
    ThunderBird about 8 years
    actually what I see is the apache2.conf
  • qualebs
    qualebs over 7 years
    Arronical where will put configuration which needs to go into the httpd.conf file? I am following this tutorial to setup glassfish behind apache e2enetworks.com/help/knowledge-base/…
  • Anon
    Anon about 4 years
    Any chance this include may get overwritten if I upgrade Apache?
  • Marco Schoolenberg
    Marco Schoolenberg almost 3 years
    finally a clear answer...