我正在運行Mac Mavericks。MAMP端口配置
所以我在這裏教程:http://www.raywenderlich.com/32963/apple-push-notification-services-in-ios-6-tutorial-part-2來實現通知服務器。
我正在嘗試使用MAMP PRO來跟隨教程。
我做了什麼:
文件夾結構:/應用程序/ MAMP/htdocs中/ PushChatServer
編輯的etc/hosts文件,添加以下行:
127.0.0.1 pushchat.local
編輯我的HTTPS .conf文件添加以下內容:
Listen 44447
Uncommented the following NG線
Include /Applications/MAMP/conf/apache/extra/httpd-vhosts.conf
編輯我的httpd-vhosts.conf文件中添加以下內容:
NameVirtualHost *:44447
<VirtualHost *:44447>
DocumentRoot "/Applications/MAMP/htdocs/PushChatServer/api"
ServerName 192.168.78.199:44447
#ServerName pushchat.local
ServerAlias pushchat.local
CustomLog "/Applications/MAMP/htdocs/PushChatServer/log/apache_access.log" combined
ErrorLog "/Applications/MAMP/htdocs/PushChatServer/log/apache_error.log"
SetEnv APPLICATION_ENV development
php_flag magic_quotes_gpc off
<Directory "/Applications/MAMP/htdocs/PushChatServer/api">
Options Indexes All
AllowOverride All
Order allow,deny
Allow from all
#Require all granted
</Directory>
</VirtualHost>
差不多,這是因爲在本教程解釋了一切。
我唯一的問題是,當我在safari中打開以下URL http://pushchat.local:44447時,它只是掛起並且不加載。
但是,如果我輸入http://pushchat.local/PushChatServer/api/index.php,則會發生一線希望,然後按預期加載。
我只是不明白爲什麼第一個不起作用,因爲它是在教程中解釋。我嘗試了很多東西,但似乎沒有任何工作。
謝謝。