天天看點

MacOSX apache 無法通路伺服器

新增一個虛拟站點,zerg.ccc

主要有三步。

1. sudo vi /private/etc/hosts;   

2. sudo vi /private/etc/apache2/extra/httpd-vhosts.conf          

3. sudo apachectl restart;

沒有報錯。

但通路:zerg.ccc   無法通路。

而且,以前其他的虛拟網站都不能通路了。

很可能是 httpd-vhosts.conf  裡面寫錯了。

終端指令:    $ sudo /usr/sbin/httpd -k start ,果然問題出現了   

AH00526: Syntax error on line 735 of /private/etc/apache2/extra/httpd-vhosts.conf:

Invalid command 'iServerName', perhaps misspelled or defined by a module not included in the server configuration

正是單詞寫錯!

學習程式設計,就是不斷解決問題的過程。學習改變命運。技術成就夢想!

----------  招募未來大神 -----------------------

如果您有利他之心,樂于幫助他人,樂于分享

如果您遇到php問題,百度且問了其他群之後仍沒得到解答

歡迎加入,PHP技術問答群,QQ群:292626152

教學相長!幫助他人,自己也會得到提升!

為了珍惜每個人的寶貴時間,請大家不要閑聊!

繼續閱讀