Dual Webserver on Dual Boot which is conected

Gimana cara nya htdocs dan database yang ada di webserver windows diakses di ubuntu Natty.

1. bikin drive penyimpanan htdoc bisa diakses secara otomatis saat linux startup,, caranya dengan mengedit file /etc/fstab

# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# partisi ntfs DATA
UUID=80EC919DEC918DD2    /media/DATA    ntfs    defaults    0    0

untuk list driver by UUID,, pake command blkid

sudo blkid

2. modify DocumentRoot

buka file /etc/apache2/sites-available/default

### edit DocumentRoot nya
DocumentRoot /media/DATA/webserver/xampp/htdocs

### juga Directory nya

<Directory /media/DATA/webserver/xampp/htdocs >

restart apache

sudo /etc/init.d/apache2 restart

3. modify Directory Mysql

stop mysql nya dulu

sudo /etc/init.d/mysql stop

edit my.cnf

gedit /etc/mysql/my.cnf
## ubah datadir nya :
datadir = /path/ke/mysql/data/di/server/windows/

Important Note:-From Ubuntu 7.10 (Gutsy Gibbon) forward, Ubuntu uses some security software called AppArmor that specifies the areas of your filesystem applications are allowed to access. Unless you modify the AppArmor profile for MySQL, you’ll never be able to restart MySQL with the new datadir location.

In the terminal, enter the command

sudo gedit /etc/apparmor.d/usr.sbin.mysqld

Copy the lines beginning with “/var/lib/mysql”, comment out the originals with hash marks (“#”), and paste the lines below the originals.

Now change “/var/lib/mysql” in the two new lines with “/path/to/new/datadir”. Save and close the file.

Restart the AppArmor profiles with the command

sudo /etc/init.d/apparmor reload

Restart MySQL

sudo /etc/init.d/mysql restart

that’s it.

Sumber :



Leave a Reply


− two = 6