AbdellahT
asked on
Apache 2 serving files on external drive
Hi guys,
I need Apache to serve a huge number of pdf files that live on a NETWORK STORAGE (exteranl drvie)
I want to be able to view each file using http://host/files/file.pdf
I am using windows 2003.
from what I understand I need to create a virtual host that its root directory is the exteranal media . is this correct?
Please advise the best way to accomplish this?
Thanks
Abdellah
I need Apache to serve a huge number of pdf files that live on a NETWORK STORAGE (exteranl drvie)
I want to be able to view each file using http://host/files/file.pdf
I am using windows 2003.
from what I understand I need to create a virtual host that its root directory is the exteranal media . is this correct?
Please advise the best way to accomplish this?
Thanks
Abdellah
ASKER
I just made a fresh apache 2 install. I am not serving any pages yet. this is my first task to do.
You mean create the text file under htdocs? if so how to include it in httpd.conf?
Thanks a lot.
Abdellah
You mean create the text file under htdocs? if so how to include it in httpd.conf?
Thanks a lot.
Abdellah
htdocs is probably your default document root. The sites-enabled folder is inside of your apache installation, probably program files or something. Files in sites-enabled will be included in the apache configuration when it loads.
If you don't ever plan to serve more than one site from this server then you can just change your default document root by following steps 5 & 6 here: http://www.ricocheting.com/server/apache.html and that should take care of everything for you.
Be aware that regardless of how you configure this you may run into issues with files that contain non-valid URL characters such as & and ,.
If you don't ever plan to serve more than one site from this server then you can just change your default document root by following steps 5 & 6 here: http://www.ricocheting.com/server/apache.html and that should take care of everything for you.
Be aware that regardless of how you configure this you may run into issues with files that contain non-valid URL characters such as & and ,.
ASKER
That's probably what I am going to do, I will just change the DocumentRoot to point the extranal drive directory. Thanks a lot.
Question: how to restrict directory browsing ?
Thanks
Abdellah
Question: how to restrict directory browsing ?
Thanks
Abdellah
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Create a new text file with a virtual host entry like the one below:
<VirtualHost *:80>
ServerName remotefiles.host.domain.co
DocumentRoot <path to files>
</VirtualHost>
I'm assuming you are already serving some content on this server. If that is the case you will have to create a DNS alias such as remotefiles.host.domain.co
Once you've done this you will have to restart apache to make the changes visible.