Accessing a network drive using a WAMP website
Posted by: timecott01 (---.plus.com)
Date: September 26, 2023 11:46AM

I want to write a new website (using wampserver) which accesses files on a networked drive (Host is Windows). Do I need to change the login for the WAMP Apache service to specify a local username/pa55w0rd? (this user having READ access to the files on the networked drive) or can it use the local system account?

Options: ReplyQuote
Re: Accessing a network drive using a WAMP website
Posted by: Otomatic (Moderator)
Date: September 26, 2023 12:04PM

> new website (using wampserver) which accesses files on a networked drive

It's the VirtualHost that will be on the network drive, not Wampserver!

You need to declare the DocumentRoot and <Directory... of the VirtualHost using the correct syntax for a network drive, e.g. :
DocumentRoot "//drive_name/folder

And for the wampapache64 service, you need to transform the local system into local username/password?

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons



Edited 1 time(s). Last edit at 09/26/2023 04:10PM by Otomatic.

Options: ReplyQuote
Re: Accessing a network drive using a WAMP website
Posted by: timecott01 (---.plus.com)
Date: September 26, 2023 06:16PM

I think I did not explain things quite right. Here goes:
I have an existing WAMPserver (Apache 2.2x, PHP7) on Windows x64. Several websites, all working fine.
I want to add a new website which will make images, currently stored on a NAS, visible to authenticated users. The website therefore needs to access the networked server (on the same LAN), which I believe is not allowed. Can this be done using the WAMPApache service login? Do I need to run the Apache service logged in to a user which can access the networked server?
Any information welcome. Thank you.

Options: ReplyQuote
Re: Accessing a network drive using a WAMP website
Posted by: Otomatic (Moderator)
Date: September 27, 2023 08:39AM

Hi,

> Apache 2.2x
I doubt Apache 2.2.x can support PHP 7!

I think the solution is to use Alias.

See the Apache documentation: Alias <- this is a link.

---------------------------------------------------------------
Documentation Apache - Documentation PHP - Documentation MySQL - Wampserver install files & addons

Options: ReplyQuote


Sorry, only registered users may post in this forum.