mini server
I just migrated my websites from windows to mac and a mate of mine asked me to blog the process.
The setup: Link to heading
Here at home i have three machines,- a pc laptop, my personal mobile machine
- mac mini, the home computer &
- a pc tower with some usb drives. thats the web server
So what i had was a 3 websites running on IIS and a few web applications, all of them run on php and mysql. I also had an ftp server and some windows shares.
Webserver/sites/applications Link to heading
For the websites i used the MAMP installer to get the apache-php-mysql combo going. It also installs phpmyadmin for simple mysql administration.
Dont forget to change the mysql password since it defaults to “root”. You can change the password by running the following in the terminal :
/Applications/MAMP/bin/mysql4/bin/mysqladmin -u root -p password newpass
just exchange newpass for your new password.
Setting up virtual hosts involves editing the third section of http.conf file located in the MAMP/conf/apache/ directory and add the following :
<virtualhost *:80> ServerName www.escape.is DocumentRoot /Users/addi/www/escape.is </virtualhost>
This accepts connections (to port 80 on every ip) where the hostname requested is www.escape.is and directs it to the document root of /Users/addi/www/escape.is where i store the website
Multiple VirtualHosts can be set up.
Next i copied the php files, exported and imported the database content with phpmyadmin.
Last duty remained and that was to edit my web applications configuration files to make sure they have the new database password. With some webapps you may need to reinstall them since some of them go through too much system dependant configuration to be able to be copied between platforms like this. My apps were these:
- Wordpress (thress versions) (only needed db config change)
- Dragonfly and Coppermine photo album (two seperate versions) (only needed db config change)
- Mediawiki (needed reinstall)
FTP server Link to heading
-
I’ve not yet finished setting up the ftp server. I have three options and for now i am going with the first one but that is only a limited solution:
1.add a user to the machine and edit his home folder in netinfo manager and give the folder the proper permissions 2.install a third party ftp server 3.use the ftp server in darwin (the os x bsd engine)….here is a guide
Windows Shares Link to heading
Windows Shares are pretty easy to get going in Os X by just checking windows shares in Sharing in System Preferences but that is a limited solution since you only get one share per user.
I have no real need for complicated shares but i tracked down a forum thread on the matter where two solutions cropped up: 1.Create users on the machine and edit their home folder 2.Get a os x server :)
Some reading material Link to heading
Conclusion Link to heading
So there is my server switch story. It isnt painless but for the most part its pretty easy and it is probably much easier when you are running Os X server which has the proper tools for multiuser share/ftp and etc.
So, the tower has been turned off. Finally there is peace and quiet in the home. Lets hope that Mac-Mini does well in the new role.