Using The External Harddrive

Discussion in 'Apache' started by amanda999, Dec 21, 2008.

  1. #1
    Hi Apache Room
    I installed Apache server sometime ago.
    I can host 2 of my own small websites now.
    But I have the content of my sites in the internal hard drive.
    Because I have a small 50GB internal hard drive, I would like to keep the content of my sites in my external hard drive.
    Please any one let me know how I do that
    Kindly Amanda Nguyen
     
    amanda999, Dec 21, 2008 IP
  2. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RTFM?

    Specify the root you want in the httpd.conf file. Its all in the docs.
     
    HSH, Dec 22, 2008 IP
  3. amanda099

    amanda099 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    HSH
    Thank You for your reply, Grunt !
    May I ask: what do you mean by "Its all in the docs" ?
    In the httpd.conf file, I see this:

    ServerRoot "C:/Program Files/Apache Software Foundation/Apache2.2"

    You mean that I should change it into:

    ServerRoot "F:/xxx"

    ?

    ( Where F is the name of my external hard drive and xxx is the folder containing the content of the site )



    Amanda Nguyen
     
    amanda099, Dec 22, 2008 IP
  4. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #4
    http://httpd.apache.org/docs/2.2/ Is the Apache Projects documentation. It has everything you need to know about the httpd.conf file.

    For instance: http://httpd.apache.org/docs/2.2/mod/core.html#documentroot contains the systax for the DocumentRoot directive. That is the directive that tells Apache where to look for the documents.

    You can use this within the VirtualHost http://httpd.apache.org/docs/2.2/mod/core.html#virtualhost directive if you are running multiple websites on a single instance of Apache...
     
    HSH, Dec 22, 2008 IP
  5. amanda099

    amanda099 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi Grunt

    In the httpd.conf file, I specify the following:

    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerName www.agoldenmoment.com
    ServerAlias agoldenmoment.com *.agoldenmoment.com
    DocumentRoot F:/sites/agoldenmoment
    </VirtualHost>


    Where F:/sites/agoldenmoment is the folder in my external hard drive containing the content of my agoldenmoment website.

    But the browser couldn't open the site
    ( it worked when I specified:
    NameVirtualHost *:80

    <VirtualHost *:80>
    ServerName www.agoldenmoment.com
    ServerAlias agoldenmoment.com *.agoldenmoment.com
    DocumentRoot htdocs/agoldenmoment
    </VirtualHost>


    )

    So what did I go wrong ?

    Thank You Beforehand
    Amanda Nguyen
     
    amanda099, Dec 23, 2008 IP
  6. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    DocumentRoot F:/sites/agoldenmoment
    should be:
    DocumentRoot "F:\sites\agoldenmoment"
     
    HSH, Dec 23, 2008 IP
  7. amanda999

    amanda999 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Thanks for the post, Grunt!
    Hi Grunt

    I just tried specifying:

    NameVirtualHost *:80
    <VirtualHost *:80>
    ServerName www.agoldenmoment.com
    ServerAlias agoldenmoment.com *.agoldenmoment.com
    DocumentRoot "F:\sites\agoldenmoment"
    </VirtualHost>


    It doesn't work .... The IE browser says "The website declined to show this webpage..........HTTP 403"
    I tried to turn off "Friendly HTTP error messages" in IE options, I
    got this message:
    Forbidden
    You don't have permission to access / on this server.


    Amanda Nguyen
     
    amanda999, Dec 23, 2008 IP
  8. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Wow.
    Windows sux!

    Try it this way:


    <VirtualHost *:80>
    ServerName www.agoldenmoment.com
    ServerAlias agoldenmoment.com *.agoldenmoment.com
    DocumentRoot "F:\sites\agoldenmoment"
    DirectoryIndex index.html (or whatever your home page is.
    </VirtualHost>


    You need to specify a default page because directory browsing is defined....
     
    HSH, Dec 23, 2008 IP
  9. amanda999

    amanda999 Peon

    Messages:
    6
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Hi Grunt

    I tried your way:
    <VirtualHost *:80>
    ServerName www.agoldenmoment.com
    ServerAlias agoldenmoment.com *.agoldenmoment.com
    DocumentRoot "F:\sites\agoldenmoment"
    DirectoryIndex index.html (or whatever your home page is.
    </VirtualHost>


    I still receive the error massage:
    Forbidden
    You don't have permission to access / on this server.


    Strange !

    Amanda Nguyen
     
    amanda999, Dec 24, 2008 IP
  10. amanda099

    amanda099 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Hi Grunt

    I tried your way:
    <VirtualHost *:80>
    ServerName www.agoldenmoment.com
    ServerAlias agoldenmoment.com *.agoldenmoment.com
    DocumentRoot "F:\sites\agoldenmoment"
    DirectoryIndex index.html
    </VirtualHost>


    I still receive the error massage:
    Forbidden
    You don't have permission to access / on this server.


    Strange !

    Amanda Nguyen
     
    amanda099, Dec 24, 2008 IP
  11. HSH

    HSH Peon

    Messages:
    73
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Well, unless you have some weird permissions set on your F drive, I am out of ideas. You need to access the apache error log and see what the internal error is for me to even begin to make any more assumptions or guesses.
    Look at the system error logs as well, and see if there are any errors there as well...
     
    HSH, Dec 26, 2008 IP
  12. amanda099

    amanda099 Peon

    Messages:
    5
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    Grunt !

    I've tried to remove the "Read-Only" attribute on my "F:\sites" folder without success. The "Read-Only" attribute rechecks the next time the "F\sites" folder is right clicked. Solutions , ideas ? Hints ? Something has to happen , or the puppys' gonna die ! hehehehehe !


    Access log:
    83.92.90.54 - - [28/Dec/2008:08:52:54 -0800] "GET / HTTP/1.1" 403 202
    83.92.90.54 - - [28/Dec/2008:09:01:53 -0800] "GET / HTTP/1.1" 403 202

    Error log:
    [Sun Dec 28 08:52:54 2008] [error] [client 83.92.90.54] client denied by server configuration: F:/sites/agoldenmoment/
    [Sun Dec 28 09:01:53 2008] [error] [client 83.92.90.54] client denied by server configuration: F:/sites/agoldenmoment/

    You said: "Look at the system error logs as well,.......". Please let me know where is the system error logs !

    Amanda Nguyen
     
    amanda099, Dec 27, 2008 IP