Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Right now, im running apache2 on debian sarge. the only problem i have is that it pulls the index.html from /var/www/apache2-default/index.html when i want it to pull from just /var/www/index.html. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Oct 2005
    Posts
    13

    how do i change this?


    Right now, im running apache2 on debian sarge. the only problem i have is that it pulls the index.html from /var/www/apache2-default/index.html when i want it to pull from just /var/www/index.html.
    where is the config file where i can change this?

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  3. #3
    Linux User stokes's Avatar
    Join Date
    Oct 2004
    Location
    UK
    Posts
    274
    The majority of the apache config is in httpd.conf. Depending on how apache was installed it might be in various places on your system. Use

    Code:
    locate httpd.conf
    To find it.

    The basics of the config are explained inside the file in the commented out lines but you may have to refer the link that serz posted to go into more detail for some of the sections if it doesn't make sense.
    Registered Linux user #389109
    My Semi-Linux Blog

  4. #4
    Linux Newbie
    Join Date
    Jul 2005
    Location
    Turn Around
    Posts
    202
    look for what it says ur document root is in httpd.conf

    just change ur document root

  5. #5
    Just Joined!
    Join Date
    Oct 2005
    Posts
    13
    ive gone into httpd.conf and looked for documentroot, but it seems to not have an entry called "documentroot". i wonder could this be the problem?
    i have both apache AND apache2 installed for some reason (total linux n00b here) and the apache httpd.conf has the documentroot entry, just not the apache2 httpd.conf.

    ive actually changed my mind and would like to change it from /var/www/apache2-default to just /public_html/

    should i just add the documentroot line? if so, what syntax would i use to get it to go to /public_html/ ?

  6. #6
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Yes, add that option.
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  7. #7
    Just Joined!
    Join Date
    Oct 2005
    Posts
    13
    wow. that didnt work at all. i tried putting
    Code:
    DocumentRoot /var/www
    into first apache2.conf, then httpd.conf. neither changed anything. my server still insists on thinking that /var/www/apache2-default is my directory.

    anyone have any other ideas?

  8. #8
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Have you restarted Apache? You have to
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

  9. #9
    Just Joined!
    Join Date
    Oct 2005
    Posts
    13
    i did restart my entire server. one of my friends who has been usin linux for awhile had me delete the "apache2-default" folder that was causing problems, then restart. i did that, and KDE, of all things, gave me a shitload of errors and i had to restart again. then, kde started working, but apache died.

    reinstalled apache, now i cant access it through my IP.
    urg....i hate configuring apache...
    any tips?

  10. #10
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Buenos Aires, Argentina
    Posts
    908
    Apache comes with a default configuration that it just works..

    What have you changed so far, only that DocumentRoot directive?
    serzsite.com.ar
    "All the drugs in this world won\'t save you from yourself"

Page 1 of 2 1 2 LastLast

Posting Permissions

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