You are here
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 (192.168.0.10).
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 192.168.0.10 as devsrv.ca
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 test.devsrv.ca OR devsrv.ca/test and would bring up the webpage in that folder.
At the moment i get the error:
Thanks for your help!!!
Hi, I think you need to edit
Hi,
I think you need to edit the /etc/hosts file of your webserver too and assign the server name to the ip address.
http://linuxservertutorials.blogspot.de/2008/11/ubuntu-hosts-file.html
If you want to use different names I think you have to configure virtual hosts in apache:
Apache Virtual Hosts:
http://httpd.apache.org/docs/2.2/vhosts/examples.html
ServerName
ServerName mywebsite.com
ServerAlias http://mywebsite.com
Did you get this sorted?
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:
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:
Then reload Apache:
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):
or set to world read/write:
(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