Re: wamp db in external HD
Posted by:
ryanxcom
(---.com)
Date: July 20, 2012 10:47AM
IT WORKS!!!!! thanks RiggsFolly.
I did some tweaks myself too. I was able to accomplish all the 4 above.
For those who also Googled for a solution this is what I did and it works for multiple website together with Database in external device and accessible via LAN.
1) Copy your files into your external device (i.e G:/mydevice/folder/website-name)
2) Change "Listen localhost:80" to "Listen *:80" in httpd.conf
3) change "ServerName localhost:80" to "ServerName *:80" in httpd.conf
4) under the <directory> tag
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from 111.111 #ip address range
Satisfy all
</Directory>
5) Create a virtual host (within the httpd.conf file at the bottom)
NameVirtualHost *:80
<VirtualHost *:80>
ServerName website-name
ServerAlias website-name *.website-name
DocumentRoot "G:/mydevice/folder/website-name"
<directory "G:/mydevice/folder/website-name">
Options Indexes FollowSymLinks
AllowOverride all
Order Allow,Deny
Allow from all
</directory>
</VirtualHost>
6) In wamp\bin\mysql\mysql-version folder edit file my.ini (as per RiggsFolly's reply above)
look for datadir=.... and change it to datadir=G:/mydevice/folder/website-name
7) Put in your website-name in windows host file
click start>run > edit c:\windows\system32\drivers\etc\hosts
ADD NEW LINE
127.0.0.1 website-name
as for me i have a copy of httpd.conf and my.ini in my device to so any new PC i install WAMP i'll just need to copy this two files into respective folders