Changing the WebServer location????

Discussion in 'Mac OS X Server, Xserve, and Networking' started by ElectricMan5, Jul 26, 2008.

  1. macrumors regular

    Joined:
    Jul 22, 2008
    #1
    I just went out and bought a 500GB external hard drive, and i want to transfer my webserver content over to it. Now, I'm using the built in webserver that comes with leopard, where you put all your stuff in the WebServer folder. Now how do i change the directory to which this folder is placed? I can't just drag the folder into the harddrive...

    How do I change the location of the files for the webserver to run, without purchasing any applications? Thanks!
     
  2. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    Edit the file /etc/apache2/httpd.conf and change the relevant setting. It should be pretty obvious which one it is. You'll need to restart the web server from the System Preferences panel before the change will take effect though.
     
  3. thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #3
    I can't find the folder. Where's the exact location of it??
     
  4. macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #4
    You need to open the Terminal application and type (exactly - without the quotes) "open /etc".
     
  5. thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #5
    thanks! it worked. i'll go see if i can change the directory...
     
  6. thread starter macrumors regular

    Joined:
    Jul 22, 2008
    #6
    It's saying i have insufficient permissions. How do i fix this?
     
  7. macrumors 6502a

    iGrant

    Joined:
    Sep 20, 2006
    Location:
    Abingdon
    #7
    The best way to edit the httpd.conf file is in Terminal with VIM. Essential you need to open VIM and do the following:

    1. cd /etc/apache2
    2. sudo vim httpd.conf
    3. You then need to change the location in httpd.conf, to edit the file hit the "i" key and then you can type and delete. To save and quit, you will hit esc to get out of the editing mode then type :wq which stands for write and quite.

    There are several tutorials online for VIM. Let me know if you need more help!

    Thanks
    iGrant
     

Share This Page