Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Web Sharing with Apache 1

Status
Not open for further replies.

JJ1

Programmer
Apr 19, 2001
104
GB
Hi All,

Sorry if this post is obvious, but I'm a newbie to Apache and I used to use IIS, but got bored of patching it every month!

OS = Windows, Server = Apache 1.3
I need to share a directory which is NOT the document root, but lies elsewhere on the hard disk. I would like this directory to be browsable and readable, but not writable.

The directory I need to share is: C:\My Documents\Music
The Document Root is currently: C:\Websites

I have tried the following:

DocumentRoot "C:/Websites/"

<Directory &quot;C:/My Documents/My Music&quot;>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>


However, when I point my browser at: &quot;, I get error 404.

The other sites folders are being served perfectly and I have NO .htaccess files.

How can I make the &quot;my Music&quot; directory 'webshared'?
Any help on this one would be very much appreciated.
Thanks to all who reply,


James.
 
Hi,

Thats because the url after the ip address/servername part is relative to the document root so apache would interpret that as C:\Websites\My Documents\My Music

You can set up an alias in httpd.conf - for example :

Alias /music &quot;C:/My Documents/My Music&quot;

Then do
Hope this helps
 
Brilliant ifincham!

Apache is great and I really appreciate that help. I put the &quot;alias /music...&quot; line after my &quot;</directory>.&quot;

I hope this was the right place to add that line.

Anyway, it works perfectly and there's no way I would have found that without your good advice.

Thanks again,

James.
 
BTW, How do you award the 'stars' is this forum?
 
In the bottom left corner of the reply you will see a link that says &quot;click here to mark this post as helpful or expert post&quot;. To test this, click the one in my reply>
right here
|
|
|
V :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top