Running Site Off External Hard Disk Won't Work :(

Discussion in 'Web Design and Development' started by SH&E, Jan 6, 2009.

  1. SH&E macrumors newbie

    Joined:
    Feb 19, 2007
    #1
    Hi, my site runs absolutely fine off my internal hard disk.
    But when I change my document root in httpd.conf, to "/Volumes/LaCie/VGObsession" (My site folder..), and restart Apache, I get a "Safari can’t connect to the server." :(. And I don't know what I'm doing wrong. Is there something special I have to write for it to load off an external hard disk? I've also tried "//localhost/Volumes/LaCie/VGObsession". And a few other variations like that.. None work.

    Could someone please give me some help?
    I have some other problems too, but this is the most important at the mo :).
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    I run my testing pages off my flash drive. The way I set it up is to setup a virtual host in httpd.conf (or vhosts.conf if Apache 2.2). This also allows me to access my testing site by entering something like mysite.local. Setting up a virtual host is very handy as it allows you to manage multiple web sites from one server.
     
  3. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #3
    Okay, I did that... But, before I did that, I changed my directory and stuff back to my original one. It was working fine before, but now even that won't work! :(. I guess I could try a restart.. If it doesn't work, I'll say.
     
  4. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #4
    Just restarted, and it still doesn't work. I'm not quite sure what I've done, but now it won't even work from the directory I was on before. It's times like this when I feel like reinstalling OSX xD. I know, probably not necessary though haha.
     
  5. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #5
    Are you getting any error messages about why it can't start? It may help to see some of the httpd.conf file, but don't post the whole thing, it can be quite long. There may be a simple typo as it can be very picky about syntax as recently happened today on another thread dealing with httpd.conf.
     
  6. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #6
    Okay, yeah I was thinking, maybe it would help if they could actually *see* my httpd.conf.. So okay :).

    DocumentRoot "/Library/VGObsession"
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    </Directory>
    <Directory "/Library/VGObsession">
    ExecCGI MultiViews
    Options -Indexes FollowSymLinks MultiViews Includes
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    <IfModule dir_module>
    DirectoryIndex index.html index.php index.shtml
    </IfModule>

    And I don't think I've made any changes to the rest of it.
     
  7. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #7
    And about the error messages, Apache is starting, atleast I think it is. I click the tick in the sharing preference pane, and it seems to work fine :/...
     
  8. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #8
    Code:
    DocumentRoot "/Library/VGObsession"
    <Directory />
    Options FollowSymLinks
    AllowOverride None
    Order deny,allow
    Deny from all
    </Directory>
    <Directory "/Library/VGObsession">
    [B]ExecCGI MultiViews[/B] # don't think this can be on its own line, it's a part of Options below
    Options -Indexes FollowSymLinks MultiViews Includes
    AllowOverride All
    Order allow,deny
    Allow from all
    </Directory>
    <IfModule dir_module>
    DirectoryIndex index.html index.php index.shtml
    </IfModule>
    If Apache is running now, you can try to do the virtual host idea right?
     
  9. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #9
    You were right about the Multiviews thing, but I mistyped that, that was actually leading on from a comment on the above line that wouldn't fit. So, :(. Still not working, no.
     
  10. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #10
    OK, rather than starting the server from preferences lets try from Terminal, it may give us error messages to work with that way. From Terminal do,
    Code:
    /usr/local/apache/bin/apachectl start
    Paste the results back here if you can't figure out what the response means.
     
  11. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #11
    "-bash: /usr/local/apache/bin/apachectl: No such file or directory"
    :s
    That's not good, is it? Paha :s
     
  12. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #12
    It may be in a different location. Are you using Tiger or Leopard? Also you can try just doing
    Code:
    apachectl start
    it may know where it's at.
     
  13. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #13
    "launchctl: CFURLWriteDataAndPropertiesToResource(/System/Library/LaunchDaemons/org.apache.httpd.plist) failed: -10"

    And I'm on Leopard.
     
  14. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #14
    Looking at this page it looks like it may be a syntax error, which was the most likely cause anyways, but we need to determine what line number. As the page suggest, after trying to run the command open up Console (an application like Terminal) and view the system.log one and look for lines similar to those mentioned at the page. Hopefully one will mention a line number for the conf file so we can narrow down the problem.
     
  15. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #15
    Yunno, I am the biggest dumbass in the world. But without your help, I wouldn't of realised it. Thank you, oh mighty one =D. It looks like I could've been misspelling it on the external hard drive all this time too. I shall check in a moment. If I am, that's a whole day, reformatting my hard drive to HFS and copying all the files onto my computer and then copy them back, a process of 6 hours, completely wasted. Just because I misspelt a folder name. At first I thought it might've been because my hard drive was NTFS formatted, but then I soon realised.. No. But that was half way through copying my files BACK to my hard drive after reformatting it xD.

    If it doesn't work off the external hard drive, or with the virtual hosts thing, I shall tell you. If it does, thank you very, very much for your help.

    Only I could've made a stupid mistake like that :p.
     
  16. SH&E thread starter macrumors newbie

    Joined:
    Feb 19, 2007
    #16
    Okay, I'm officially a retard xD. It works, thank you for your help.
    It's greatly appreciated :).
     
  17. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #17
    Ha ha, glad it's working now though. Typos are a programmers worst enemy, damn you semicolon.
     

Share This Page