在centos6裏使用httpd2.2版本,然後在/etc/httpd/conf.d/下定義配置文件反代至後端tomcat服務器,配置完成後重新啓動httpd並訪問,出現了500的錯誤代碼,查看httpd的錯誤訪問日誌,顯示如下信息:
configuration error: couldn't perform authentication. AuthType not set!: /favicon.ico, referer: http://192.168.25.129/
說明配置文件裏授權的部分寫錯了,我寫的是require all granted,後來查到了國外的網站才發現,原來我用的是apache2.2版本,不支持這種寫法,2.4版才支持,於是我改爲:
Order allow,deny
allow from all
重啓之後能夠訪問並代理至tomcat服務器。
對我來說沒一個錯誤都是一個坎,但我不會放棄,繼續努力,加油!