apache/webserver help

Posted:
in Genius Bar edited January 2014
finally, I got my webserver running. With portmapping, dyndns etc.

Now I want to add a path to an external drive (my ipod). I read that it's possible to set alias directories in apache.

How does it work?

Any ideas and help appreciated

Comments

  • Reply 1 of 1
    thuh freakthuh freak Posts: 2,664member
    Okay, in terminal, do this (with the iPod plugged in):

    [code]ls /Volumes/;

    cd /etc/httpd/;

    sudo emacs httpd.conf;</pre><hr></blockquote>



    note after the first command (ls..) you should see the name of your iPod, keep this in mind. the last command may ask for your password. emacs (a text-editing program) will open up in the terminal. now try to navigate to the end of the file. if u hold page-down for a while you should get there, you may overshoot a little and throw extra white-space on the end (which doesn't really hurt anyone, so that doesn't matter). now, on a clean line, type

    [code]Alias /myIpod/ /Volumes/iPod_Name_remembered_from_earlier/</pre><hr></blockquote>



    If you want to share a sub-folder of the iPod instead of the base, after the last slash on the "Alias.." line (without any leading whitespace) type the name of the folder. If the folder is within a folder, within a folder, use a slash (/) to separate them. example:

    [code]Alias /myIpodSubFolder/ /Volumes/Name's iPod/oneFolder/twoFolder/redFolder/blueFolder/</pre><hr></blockquote>



    Also, you can use whatever you want for the "myIpod" part. Thats the part you'll type into the webbrowser (after your address).



    To save in emacs, you have to hit several keys. First, hold 'control' and hit 'x'. Then release 'x', maintain 'control' and hit 's'. to Quit emacs hold 'control' and hit 'x', maintain 'control' and hit 'c'. If you don't want to save, skip the saving step, but answer 'n' to the first question emacs gives you (save file?), and 'yes' to the second question (Okay to exit with unsaved buffers?).



    Now, open up Safari, or Chimera (or IE), and type in <a href="http://127.0.0.1/myIpod/."; target="_blank">http://127.0.0.1/myIpod/.</a>; Replace 'myIpod' with whatever you changed the alias to back in emacs.
Sign In or Register to comment.