apache mod_access



贊助商連結


geniusbou
2009-01-25, 11:48 AM
我想用server-status
http://xxx.twbbs.org/server-status
在status.conf



<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from xxx.twbbs.org
</Location>


可是我去連http://xxx.twbbs.org/server-status
卻出現


Forbidden

You don't have permission to access /server-status on this server.


但是將xxx.twbbs.org 改成 IP 就可以連的上


Allow from 123.123.123.123


再去連http://xxx.twbbs.org/server-status
就連的上
而xxx.twbbs.org 有對應到IP 123.123.123.123
因為 ping xxx.twbbs.org


PING xxx.twbbs.org (123.123.123.123)
64 bytes from.....
64 bytes from.....
64 bytes from.....
3 packets transmitted, 3 received, 0% packet loss, time 2007ms


是Allow from 後面不能接domain name嗎
還是我那裡沒設好

贊助商連結


tvirus
2009-01-25, 12:43 PM
http://httpd.apache.org/docs/1.3/mod/mod_access.html#allow
http://httpd.apache.org/docs/2.0/mod/mod_access.html#allow

geniusbou
2009-01-25, 04:41 PM
http://httpd.apache.org/docs/1.3/mod/mod_access.html#allow
http://httpd.apache.org/docs/2.0/mod/mod_access.html#allow

有參考過了
不過還是不太明白哪裡出錯了...
能在多解釋一下嗎 ?
謝謝!!

repsol
2009-01-26, 10:01 PM
check apache 設定檔中 HostnameLookups 的設定

geniusbou
2009-01-27, 03:44 PM
check apache 設定檔中 HostnameLookups 的設定


HostnameLookups = Double

repsol
2009-01-29, 02:03 PM
你把123.123.123.123 xxx.twbbs.org 寫到/etc/hosts裡面試試看

geniusbou
2009-01-30, 12:26 PM
你把123.123.123.123 xxx.twbbs.org 寫到/etc/hosts裡面試試看

請問如果是不固定的IP呢?