#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2

    Apache vhost config (newbie)


    Hi all,

    An installed file tells me:

    "The database credentials are stored in the Apache vhost config..."

    Can anyone please suggest what / where this apache file is so I can read it?

    Thank you...
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    It depends on where you created it. If someone else created it, then it's probably located in a directory like /etc/httpd, /etc/apache, /etc/apache2 or something along those lines.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by E-Oreo
    It depends on where you created it. If someone else created it, then it's probably located in a directory like /etc/httpd, /etc/apache, /etc/apache2 or something along those lines.
    @ E-Oreo ok thanks I did not create it. Do you know the proper file name for what they call Apache vhost config ?

    Thanks...
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by Juc1
    @ E-Oreo ok thanks I did not create it. Do you know the proper file name for what they call Apache vhost config ?

    Thanks...
    OK so in my case (Ubuntu) the main Apache config file is /etc/apache2/apache2.conf. But can anyone please tell me is any file treated as an apache config file without the need for an include directive if it is inside the /etc/apache2/conf.d/ or /etc/apache2/ directory?


    Thanks...
  8. #5
  9. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,112
    Rep Power
    9398
    There's probably an Include for that directory already. Check in the apache2.conf near the bottom.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by requinix
    There's probably an Include for that directory already. Check in the apache2.conf near the bottom.
    Ok thanks yes there is this

    # Include generic snippets of statements
    Include conf.d/
    So I guess conf.d means /etc/apache2/conf.d

    So anyway I think that include directives need to be in the main configuration file (ie /etc/apache2/apache2.conf in my case) not just in any apache config file - in other words if a file / directory is not included in the main configuration file then it is ignored - have I got that right?

    Thanks...
  12. #7
  13. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,112
    Rep Power
    9398
    Not really: Include can be used anywhere, even in .htaccess files.

    What's the actual problem you're trying to solve?
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by requinix
    Not really: Include can be used anywhere, even in .htaccess files.
    Ok thanks so do you mean that my /etc/apache2/apache2.conf could say "include directory x" and then directory x could have another include directive saying "include directory y" ie where directory y has not been mentioned by my apache2.conf?

    What's the actual problem you're trying to solve?
    I am just trying to understand how to work out where the various apache config files are.
  16. #9
  17. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,112
    Rep Power
    9398
    Originally Posted by Juc1
    Ok thanks so do you mean that my /etc/apache2/apache2.conf could say "include directory x" and then directory x could have another include directive saying "include directory y" ie where directory y has not been mentioned by my apache2.conf?
    Yes.

    Originally Posted by Juc1
    I am just trying to understand how to work out where the various apache config files are.
    Depends on the distro. Ubuntu puts everything I can think of under /etc/apache2.
    My httpd.conf (12.04) is empty and apache2.conf serves as the main configuration file. Individual sites are listed under sites-available and are enabled by symlinks in sites-enabled. Modules are the same way with mods-available and mods-enabled.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    46
    Rep Power
    2
    Originally Posted by requinix
    Yes.


    Depends on the distro. Ubuntu puts everything I can think of under /etc/apache2.
    My httpd.conf (12.04) is empty and apache2.conf serves as the main configuration file. Individual sites are listed under sites-available and are enabled by symlinks in sites-enabled. Modules are the same way with mods-available and mods-enabled.
    ok thanks

IMN logo majestic logo threadwatch logo seochat tools logo