http://www.mamp.info/en/index.html
MAMP保函了apache服务器,php脚本解释,以及mysql数据库,一般而言使用这三个东西就可以完成一个web server搭建了。如果你决定使用自己的web server,需要保证有以下的extension安装并启用了:PDO/pdo——mysql/mbstring/openssl
这个东西有点像windows下的那个web platform installer,模拟一个web 服务器,可以图形化管理。
安装MAMP非常简单,就象安装一个普通程序一样,拖到application 目录。启动它,只要进入application/mamp(是个大象图标),mamp的UI就打开了,就可以浏览默认页面了
Listen 44447
<VirtualHost *:44447>
DocumentRoot "/Users/matthijs/Desktop/PushChatServer/api" //需要根据webpage目录位置换
ServerName 192.168.2.244:44447 //需要根据本地的ip换
ServerAlias pushchat.local //在etc/hosts中增加 127.0.0.1 pushchat.local
CustomLog "/Users/matthijs/Desktop/PushChatServer/log/apache_access.log" combined
ErrorLog "/Users/matthijs/Desktop/PushChatServer/log/apache_error.log"
SetEnv APPLICATION_ENV development
php_flag magic_quotes_gpc off
<Directory "/Users/matthijs/Desktop/PushChatServer/api">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
按照php+apach站点的配置方式,虚拟目录/站点,需要修改
httpd.conf ,打开A
pplications/MAMP/conf/apache/httpd.conf 加上以上的代码:
我们的web service 运行在port 44447. 一般而言默认的站点 port 80 和默认的 MAMP web 在 port 8888. 所以就选了4447防止冲突:
mysql可以通过mamp的默认站点来图形化配置。