LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (http://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to share NFS drive content to web port 80 using apache ? (http://www.linuxquestions.org/questions/linux-server-73/how-to-share-nfs-drive-content-to-web-port-80-using-apache-842019/)

albertwt 11-02-2010 09:19 PM

How to share NFS drive content to web port 80 using apache ?
 
Hi All,

My goal is to provide file access through HTTP to all of my NFS shared drive that i dedicated for public access.

Is it possible to create a website using HTTP which list all of the contains of my NFS shared drive to the public ?

it is failed even just to showmount, in Windows i usually access it using \\10.2.2.50\Volume_1 on the windows explorer.

Code:

root@sv6:/etc/apache2# apt-get install nfs-common

root@sv6:/etc/apache2# showmount
clnt_create: RPC: Program not registered

root@sv6:/etc/apache2# showmount -e 10.2.2.50
clnt_create: RPC: Port mapper failure - RPC: Unable to receive

Thanks.

albertwt 11-02-2010 09:22 PM

FYI: this is D-Link DNS-323 NAS device.

frieza 11-02-2010 09:32 PM

assuming you can mount the device simply change the document root of your web server in either your apache2.conf or /etc/apache2/sites-available/000-default to the mounted nfs volume

jwl17330536 11-03-2010 01:13 PM

Once you have your Apache service up and running simply put a link in the document root to the nfs share directory.

Make sure your site is configured to allow indexes and following symlinks:

<Directory /var/www/html/site>
Options Indexes FollowSymLinks MultiViews
AllowOverride AuthConfig Limit
Order allow,deny
allow from all
</Directory>

stress_junkie 11-03-2010 01:20 PM

Or forget NFS and use WebDAV.

http://en.wikipedia.org/wiki/WebDAV#Linux

albertwt 11-04-2010 08:27 AM

ah yes, WebDAV I almost forgot about that, thanks man for the suggestion, I'll try WebDAV protocol first and then back to NFS.

Cheers.


All times are GMT -5. The time now is 02:39 AM.