So i had a spare laptop that i installed LAMP stack and its working greate i can access it through the static IP port i set (


Apache Questions:

I shared a folder called on my network drive.

I logged with PuTTY and created a folder /mnt/web i mounted the network drive in step 1.( I can see the contents of the folder in mnt/web)

In apache Webserver the virtual server is setup like this in the image.

In windows directory Windows\system32\etc\drivers\host file i set as

What i want it to do:

so if i have a folder in /mnt/web/test and test includes index.php and other parts of the webpage i want to be able to type in OR and would bring up the webpage in that folder.

At the moment i get the error:


Thanks for your help!!!

Andy's picture


I think you need to edit the /etc/hosts file of your webserver too and assign the server name to the ip address.


If you want to use different names I think you have to configure virtual hosts in apache:

Apache Virtual Hosts:

FRO5T's picture



Jeremy Davis's picture

If not, I'd manually edit the sites/virtual host files. I have had mixed results with Webmin and doing it manually isn't that hard. Here's what I'd do:

cp /etc/apache2/sites-available/default /etc/apache2/sites-available/test
nano /etc/apache2/sites-available/test

Then where it says '/var/www' change that to '/mnt/web'. Then exit and save (<Ctrl><X>).

Disable the default site and enable your new one:

a2dissite default
a2ensite test

Then reload Apache:

service apache2 reload

The only other issue you may have is permissions. On the file host make sure that share permissions are set to allow all, and file permissions are set to everybody (at least read). Now I'm not sure but you may also need to set permissions for these files in Linux (although I don't do what you are doing so not sure if this will work). Something like give ownership to Apache user (www-data):

chown -R www-data:www-data /mnt/web

or set to world read/write:

chmod -R 777 /mnt/web

(I suspect the above steps will only work if you grant full control to 'Everybody' for the folder and files within Win). Finally if you want this file share to be mounted on boot then you'll need to edit fstab. I would suggest that you do a google on how to do that with Win fileshares (search something like "debian fstab samba" or similar).

Add new comment