[root@www nginx]# nginx -t
nginx: [emerg] unknown directive "geoip_country" in /etc/nginx/nginx.conf:40
nginx: configuration file /etc/nginx/nginx.conf test failed
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/mainline/centos/$releasever/$basearch/
gpgcheck=0
enabled=1
# yum install nginx-module-geoip
The GeoIP dynamic module for nginx has been installed.
To enable this module, add the following to /etc/nginx/nginx.conf
and reload nginx:
load_module modules/ngx_http_geoip_module.so;
user nginx;
worker_processes 1;
worker_rlimit_nofile 1024;
error_log /var/log/nginx/error.log;
pid /var/run/nginx.pid;
#### Load GeoIP Module ####
load_module modules/ngx_http_geoip_module.so;
load_module modules/ngx_stream_geoip_module.so;
event {
..
..
}
http {
..
..
}
歡迎光臨 ADJ網路實驗室 (http://dz.adj.idv.tw/) | Powered by Discuz! 6.0.0 |