Can somebody explain The Debian Apache2 configuration files conundrum?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












I am running Apache 2.4 as can be seen here:



$ sudo apache2ctl -v
Server version: Apache/2.4.10 (Debian)
Server built: Jul 23 2014 13:15:48


Apparently there are three different configuration files which need to be configured :-



/etc/apache2$ ls *.conf
apache2.conf ports.conf


and



/etc/apache2/conf.d$ ls *.conf
httpd.conf


Apparently these three files work something like this :-



apache2.conf :- It is the Global configuration file.



ports.conf :- This is apparently to tell Apache which IP Addresses and port to listen and bind to (to do web-serving).



httpd.conf :- This is something to do with user configs. I do not have much idea about it.



Now I have two questions :-



a. Is my understanding of the three files correct ? If somebody could better explain it would be nice.



b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf while the other two are in /etc/apache2/ ?










share|improve this question























  • It should be documented in /usr/share/doc/apache2/README.Debian.
    – garethTheRed
    Sep 12 '14 at 10:58














up vote
0
down vote

favorite












I am running Apache 2.4 as can be seen here:



$ sudo apache2ctl -v
Server version: Apache/2.4.10 (Debian)
Server built: Jul 23 2014 13:15:48


Apparently there are three different configuration files which need to be configured :-



/etc/apache2$ ls *.conf
apache2.conf ports.conf


and



/etc/apache2/conf.d$ ls *.conf
httpd.conf


Apparently these three files work something like this :-



apache2.conf :- It is the Global configuration file.



ports.conf :- This is apparently to tell Apache which IP Addresses and port to listen and bind to (to do web-serving).



httpd.conf :- This is something to do with user configs. I do not have much idea about it.



Now I have two questions :-



a. Is my understanding of the three files correct ? If somebody could better explain it would be nice.



b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf while the other two are in /etc/apache2/ ?










share|improve this question























  • It should be documented in /usr/share/doc/apache2/README.Debian.
    – garethTheRed
    Sep 12 '14 at 10:58












up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am running Apache 2.4 as can be seen here:



$ sudo apache2ctl -v
Server version: Apache/2.4.10 (Debian)
Server built: Jul 23 2014 13:15:48


Apparently there are three different configuration files which need to be configured :-



/etc/apache2$ ls *.conf
apache2.conf ports.conf


and



/etc/apache2/conf.d$ ls *.conf
httpd.conf


Apparently these three files work something like this :-



apache2.conf :- It is the Global configuration file.



ports.conf :- This is apparently to tell Apache which IP Addresses and port to listen and bind to (to do web-serving).



httpd.conf :- This is something to do with user configs. I do not have much idea about it.



Now I have two questions :-



a. Is my understanding of the three files correct ? If somebody could better explain it would be nice.



b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf while the other two are in /etc/apache2/ ?










share|improve this question















I am running Apache 2.4 as can be seen here:



$ sudo apache2ctl -v
Server version: Apache/2.4.10 (Debian)
Server built: Jul 23 2014 13:15:48


Apparently there are three different configuration files which need to be configured :-



/etc/apache2$ ls *.conf
apache2.conf ports.conf


and



/etc/apache2/conf.d$ ls *.conf
httpd.conf


Apparently these three files work something like this :-



apache2.conf :- It is the Global configuration file.



ports.conf :- This is apparently to tell Apache which IP Addresses and port to listen and bind to (to do web-serving).



httpd.conf :- This is something to do with user configs. I do not have much idea about it.



Now I have two questions :-



a. Is my understanding of the three files correct ? If somebody could better explain it would be nice.



b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf while the other two are in /etc/apache2/ ?







debian apache-httpd configuration






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Aug 21 at 8:12









Rui F Ribeiro

36.7k1271116




36.7k1271116










asked Sep 12 '14 at 10:13









shirish

3,31742474




3,31742474











  • It should be documented in /usr/share/doc/apache2/README.Debian.
    – garethTheRed
    Sep 12 '14 at 10:58
















  • It should be documented in /usr/share/doc/apache2/README.Debian.
    – garethTheRed
    Sep 12 '14 at 10:58















It should be documented in /usr/share/doc/apache2/README.Debian.
– garethTheRed
Sep 12 '14 at 10:58




It should be documented in /usr/share/doc/apache2/README.Debian.
– garethTheRed
Sep 12 '14 at 10:58










1 Answer
1






active

oldest

votes

















up vote
2
down vote














a. Is my understanding of the three files correct ? If somebody could
better explain it would be nice.




In general, it's correct. But you can read more details, if you open /etc/apache2/apache2.conf:



# * apache2.conf is the main configuration file (this file). It puts the pieces
# together by including all remaining configuration files when starting up the
# web server.
#
# ....
#
# * ports.conf is always included from the main configuration file. It is
# supposed to determine listening ports for incoming connections, and which
# of these ports are used for name based virtual hosts.


With httpd.conf, I think it existed only for compatible with other programs that require it. It's only a normal configuration file with apache.




b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf
while the other two are in /etc/apache2/ ?




Because it's default design in Debian. Again from /etc/apache2/apache2.conf:



# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
# /etc/apache2/
# |-- apache2.conf
# | `-- ports.conf
# |-- mods-enabled
# | |-- *.load
# | `-- *.conf
# |-- conf.d
# | `-- *
# `-- sites-enabled
# `-- *


Note



  • Httpd default distro layout





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f155218%2fcan-somebody-explain-the-debian-apache2-configuration-files-conundrum%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    2
    down vote














    a. Is my understanding of the three files correct ? If somebody could
    better explain it would be nice.




    In general, it's correct. But you can read more details, if you open /etc/apache2/apache2.conf:



    # * apache2.conf is the main configuration file (this file). It puts the pieces
    # together by including all remaining configuration files when starting up the
    # web server.
    #
    # ....
    #
    # * ports.conf is always included from the main configuration file. It is
    # supposed to determine listening ports for incoming connections, and which
    # of these ports are used for name based virtual hosts.


    With httpd.conf, I think it existed only for compatible with other programs that require it. It's only a normal configuration file with apache.




    b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf
    while the other two are in /etc/apache2/ ?




    Because it's default design in Debian. Again from /etc/apache2/apache2.conf:



    # The Apache 2 web server configuration in Debian is quite different to
    # upstream's suggested way to configure the web server. This is because Debian's
    # default Apache2 installation attempts to make adding and removing modules,
    # virtual hosts, and extra configuration directives as flexible as possible, in
    # order to make automating the changes and administering the server as easy as
    # possible.

    # It is split into several files forming the configuration hierarchy outlined
    # below, all located in the /etc/apache2/ directory:
    #
    # /etc/apache2/
    # |-- apache2.conf
    # | `-- ports.conf
    # |-- mods-enabled
    # | |-- *.load
    # | `-- *.conf
    # |-- conf.d
    # | `-- *
    # `-- sites-enabled
    # `-- *


    Note



    • Httpd default distro layout





    share|improve this answer
























      up vote
      2
      down vote














      a. Is my understanding of the three files correct ? If somebody could
      better explain it would be nice.




      In general, it's correct. But you can read more details, if you open /etc/apache2/apache2.conf:



      # * apache2.conf is the main configuration file (this file). It puts the pieces
      # together by including all remaining configuration files when starting up the
      # web server.
      #
      # ....
      #
      # * ports.conf is always included from the main configuration file. It is
      # supposed to determine listening ports for incoming connections, and which
      # of these ports are used for name based virtual hosts.


      With httpd.conf, I think it existed only for compatible with other programs that require it. It's only a normal configuration file with apache.




      b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf
      while the other two are in /etc/apache2/ ?




      Because it's default design in Debian. Again from /etc/apache2/apache2.conf:



      # The Apache 2 web server configuration in Debian is quite different to
      # upstream's suggested way to configure the web server. This is because Debian's
      # default Apache2 installation attempts to make adding and removing modules,
      # virtual hosts, and extra configuration directives as flexible as possible, in
      # order to make automating the changes and administering the server as easy as
      # possible.

      # It is split into several files forming the configuration hierarchy outlined
      # below, all located in the /etc/apache2/ directory:
      #
      # /etc/apache2/
      # |-- apache2.conf
      # | `-- ports.conf
      # |-- mods-enabled
      # | |-- *.load
      # | `-- *.conf
      # |-- conf.d
      # | `-- *
      # `-- sites-enabled
      # `-- *


      Note



      • Httpd default distro layout





      share|improve this answer






















        up vote
        2
        down vote










        up vote
        2
        down vote










        a. Is my understanding of the three files correct ? If somebody could
        better explain it would be nice.




        In general, it's correct. But you can read more details, if you open /etc/apache2/apache2.conf:



        # * apache2.conf is the main configuration file (this file). It puts the pieces
        # together by including all remaining configuration files when starting up the
        # web server.
        #
        # ....
        #
        # * ports.conf is always included from the main configuration file. It is
        # supposed to determine listening ports for incoming connections, and which
        # of these ports are used for name based virtual hosts.


        With httpd.conf, I think it existed only for compatible with other programs that require it. It's only a normal configuration file with apache.




        b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf
        while the other two are in /etc/apache2/ ?




        Because it's default design in Debian. Again from /etc/apache2/apache2.conf:



        # The Apache 2 web server configuration in Debian is quite different to
        # upstream's suggested way to configure the web server. This is because Debian's
        # default Apache2 installation attempts to make adding and removing modules,
        # virtual hosts, and extra configuration directives as flexible as possible, in
        # order to make automating the changes and administering the server as easy as
        # possible.

        # It is split into several files forming the configuration hierarchy outlined
        # below, all located in the /etc/apache2/ directory:
        #
        # /etc/apache2/
        # |-- apache2.conf
        # | `-- ports.conf
        # |-- mods-enabled
        # | |-- *.load
        # | `-- *.conf
        # |-- conf.d
        # | `-- *
        # `-- sites-enabled
        # `-- *


        Note



        • Httpd default distro layout





        share|improve this answer













        a. Is my understanding of the three files correct ? If somebody could
        better explain it would be nice.




        In general, it's correct. But you can read more details, if you open /etc/apache2/apache2.conf:



        # * apache2.conf is the main configuration file (this file). It puts the pieces
        # together by including all remaining configuration files when starting up the
        # web server.
        #
        # ....
        #
        # * ports.conf is always included from the main configuration file. It is
        # supposed to determine listening ports for incoming connections, and which
        # of these ports are used for name based virtual hosts.


        With httpd.conf, I think it existed only for compatible with other programs that require it. It's only a normal configuration file with apache.




        b. why is httpd.conf supposed to be in /etc/apache2/conf.d/httpd.conf
        while the other two are in /etc/apache2/ ?




        Because it's default design in Debian. Again from /etc/apache2/apache2.conf:



        # The Apache 2 web server configuration in Debian is quite different to
        # upstream's suggested way to configure the web server. This is because Debian's
        # default Apache2 installation attempts to make adding and removing modules,
        # virtual hosts, and extra configuration directives as flexible as possible, in
        # order to make automating the changes and administering the server as easy as
        # possible.

        # It is split into several files forming the configuration hierarchy outlined
        # below, all located in the /etc/apache2/ directory:
        #
        # /etc/apache2/
        # |-- apache2.conf
        # | `-- ports.conf
        # |-- mods-enabled
        # | |-- *.load
        # | `-- *.conf
        # |-- conf.d
        # | `-- *
        # `-- sites-enabled
        # `-- *


        Note



        • Httpd default distro layout






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Sep 12 '14 at 10:39









        cuonglm

        98.4k21188284




        98.4k21188284



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f155218%2fcan-somebody-explain-the-debian-apache2-configuration-files-conundrum%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay