How to configure WAMP with a DocumentRoot on a mapped network drive?
Posted by: tardis (---.static.eucl.wi.charter.com)
Date: October 31, 2014 03:10PM

I'm trying to set up WAMP server on a local machine so a PHP script on a mapped network drive can be executed, either from the local machine or from any other machine that's also mapped to that drive.

This is what I have in my httpd-vhosts.conf file:

<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "//111.1.11.1/path/to/T Web"
ServerName TWEB
<Directory "C:/websites/www/tweb">
AllowOverride All
Require local
Require ip 111.1.11
</Directory>
</VirtualHost>

The PHP works and executes when placed in the local www folder, but just shows up in the browser as code when executed in the remote T Web folder. What am I missing here?

I'm using Windows 7 with WAMPserver 2.5

Re: How to configure WAMP with a DocumentRoot on a mapped network drive?
Posted by: RiggsFolly (---.dynamic.dsl.as9105.com)
Date: October 31, 2014 03:34PM

Bad idea. Its a guaranteed disaster waiting to happen.

Use a source management tool like GIT or anything else you prefer rather than try and share source like this. Then give all developers their own version of WAMPServer.

---------------------------------------------------------------------------------------------
(Windows 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Re: How to configure WAMP with a DocumentRoot on a mapped network drive?
Posted by: tardis (---.static.eucl.wi.charter.com)
Date: October 31, 2014 03:52PM

All I'm trying to do is make it so a PHP script can be executed so a form can be sent from an intranet web page. The intranet site is stored on a network drive that all the employees are mapped to.

Re: How to configure WAMP with a DocumentRoot on a mapped network drive?
Posted by: Otomatic (Moderator)
Date: October 31, 2014 05:19PM

Hi,

It works for me with a network drive and VirtualHost like this:
<VirtualHost *:80>
   ServerName my-site-number-3
   DocumentRoot //192.168.0.11/public/sites/site3
   ServerAdmin webmaster@nowhere.net
  <Directory "//192.168.0.11/public/sites/site3/">
    Options Indexes FollowSymLinks MultiViews
    AllowOverride all
    <RequireAny>
    	Require local
    	Require ip 192.168.0
    </RequireAny>
  </Directory>
</VirtualHost>
192.168.0 is the root of ip's of employees PC.

This need that the network drive must be mapped to the server PC with an IP adress.

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

Re: How to configure WAMP with a DocumentRoot on a mapped network drive?
Posted by: Emmy wilson (41.202.233.---)
Date: November 05, 2014 11:34PM

What I thing It is works for me with a network drive and VirtualHost like this:
<VirtualHost *:80>
ServerName my-site-number-3
DocumentRoot //192.168.0.11/public/sites/site3
ServerAdmin webmaster@nowhere.net
<Directory "//192.168.0.11/public/sites/site3/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
<RequireAny>
Require local
Require ip 192.168.0
</RequireAny>
</Directory>
</VirtualHost>
192.168.0 is the root of ip's of employees PC.

This need that the network drive must be mapped to the server PC with an IP adress

Sorry, only registered users may post in this forum.