SitePoint Sponsor

User Tag List

Results 1 to 8 of 8
  1. #1
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    help with DocumentRoot/httpd.conf

    How do I configure the httpd.conf file - specifically how do I set my DocumentRoot

    I have tried DocumentRoot /my/web/files

    but I just get DocumentRoot: command not found

    Thanks for the help

    I am running Apache 2.0.40

  2. #2
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi ,
    First of all what OS are you running ?!?
    By the way you have to modify the httpd.conf file ( depend where you installed apache, it should be located under somepath/conf directory ) and search for
    DocumentRoot directive inside it.
    Change the path according to your needs.
    Remember to change
    <Directory "C:/path/to/old/document/root/htdocs">
    to your new documentroot too.
    Restart apache and enjoy!

    I hope I was clear enough .


    pippo
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03

  3. #3
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for all the help. I am a complete newbie to this and I appreciate all the help...

    I am running Linux Redhat 7.2 - I'm connected through SSH

    I know the location of the file

    /etc/httpd/conf

    but what do I do once I am there? I cannot cd into it and if I type httpd.conf I just get command not found.

    Thanks again for the help.

  4. #4
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm not a *nix expert,
    but if you can't cd into /etc/httpd/conf then that's because you have not the right permission ( I think you need to be root to modify that file ).
    The file can be edited using the vi editor such as:

    $su root
    password

    #vi /etc/httpd/conf/httpd.conf

    or

    #cd /etc/httpd/conf
    #vi httpd.conf

    but if you can't cd into that dir maybe you have not the right permissions.
    Have you root access ?!?
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03

  5. #5
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    very usefule info...

    I can CD into the /conf directory...I am such a newbie that i was trying to CD into the actual httpd.conf file. I knew it was a file, but I didnt know what else to try.

    I am actually in the file now (I had no idea about vi), I figured out I can edit it by hitting insert, but what do I do once I make the changes...how do I save it and exit vi?

    I also noticed that the ServerName is listed as

    new.host.name:80

    but it is commented (#) out. Do I need to edit this also, or do I just leave it?

    thanks again!!!
    Last edited by pablosergio; Oct 21, 2002 at 13:25.

  6. #6
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Eh, eh I can use vi just for the basics,
    I found that pico is more user friendly...for me at least

    Eventually try pico httpd.conf

    By the way
    vi httpd.conf
    by default with vi you are on command mode
    to begin to insert you need to press i and then you can type text
    to go back to command mode press esc
    to delete a character you need to be on command mode and press x
    to save your modification
    press esc ( to go on command mode )
    then :wq
    which w means write
    while q means quit

    if you wish to exit without saving then type
    :q!

    This is a brief et incomplete overview of vi commands from a beginner

    Good Luck!



    pippo

    p.s.
    Some links about vi
    http://www.eng.hawaii.edu/Tutor/vi.html
    http://www.thomer.com/vi/vi.html
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03

  7. #7
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HOORAY - IT WORKS !!!

    Now I have to get PHP/MySQL running, make sure CGI's work, etc. But I do see my web page.

    God Bless SitePoint, this messageBoard, and especially you PIPPO!!!

  8. #8
    FreeBSD The Power to Serve silver trophy pippo's Avatar
    Join Date
    Jul 2001
    Location
    Italy
    Posts
    4,514
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm happy to accept the blessing
    Mr Andrea
    Former Hosting Team Advisor
    Former Advisor of '03


Bookmarks

Posting Permissions

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