Find the answer to your Linux question:
Results 1 to 4 of 4
Just installed Debian and did a apt-get apache2 and the first thing I noticed is apache has been installed to /etc/apache2 and the executables are in /usr/sbin. If I am ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Posts
    84

    Apache 2 on Debain SARGE


    Just installed Debian and did a apt-get apache2 and the first thing I noticed is apache has been installed to /etc/apache2 and the executables are in /usr/sbin. If I am correct apache2 should be in /usr/local and the httpd.doc file should have a whole list of stuff. Instead, the httpd.doc file is fairly empty, it had like 2 or 3 lines commented out at the top that simply state that the file is here for "backwards compatibility reason and installing 3rd party modules".
    This is my first time configuring apache2. Basically I just need to set it up to host virtual domains. If anyone can post an example of their httpd.doc file so I can reference it and make mine match it (of course I will change the stuff needed) I would greatly appreciate it. Is what I am doing much more complicated that I think?

    It also seems I do not have a /www directory or anything. Is this one of those examples of a distro doing things their own way?

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    I'll start off with pointing you in the right direction, you should be looking for the /ect/apache2/httpd.conf (or apache2.conf on some systems) file, since this is what is used to configure apache. All the configuration files you need for apache are under /etc. In the httpd.conf file the server root should be stated, unually most package managers will put at /var/www/ though you can change this to wherever you like, I personaly use /srv/www if I setup a webserver.

    I hope this guides you in the right direction, since the httpd.conf file is useually quite good at saying what each part in it does.
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

  3. #3
    Just Joined!
    Join Date
    Jul 2005
    Posts
    84
    Thank you for your reply, but my httpd.conf file states nothing at all except what is commented out (see my original post), I have read that apache2 puts it's main config in apache2.conf, and this does seem to be the case on my install, but unfortunatly there is no sample vhost config. This just means that I am going to have to enter my own and trial and error it, which is fine. That is how I learned linux in the first place

  4. #4
    Just Joined!
    Join Date
    Nov 2005
    Posts
    1

    apache2 vhost configuration

    well start here.
    the httpd.conf file in /etc/apache2/httpd.conf is for user specific configurations.. they seperate stuff in apache 2. the primary conf file is /etc/apache2.conf and if you look at the bottom you will see that it loads httpd.conf . this way you can have seperate files.

    your sample vhost file is in /etc/apache2/sites-enabled for future reference. you have probably alread figured this out, but there you go. It will be called 000-default

    i'm running ubuntu server by the way as far as ports go..

    happy hunting.
    i'm setting mine up as well.

    chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •