Added load_module into /etc/nginx/nginx.conf and restart NGINX
$ sudo vi /etc/nginx/nginx.conf
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
#--- Add this 2 lines ----
load_module modules/ngx_http_geoip2_module.so;
load_module modules/ngx_stream_geoip2_module.so;
[...]
$ sudo systemctl restart nginx
Verify NGINX configuration and NGINX status
$ sudo nginx -T | grep geoip2
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
load_module modules/ngx_http_geoip2_module.so;
load_module modules/ngx_stream_geoip2_module.so;
$ sudo systemctl status nginx
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2021-07-28 11:10:53 +07; 1min 38s ago
Docs: man:nginx(8)
Process: 3109605 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Process: 3109611 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
Main PID: 3109613 (nginx)
Tasks: 3 (limit: 9510)
Memory: 3.6M
CGroup: /system.slice/nginx.service
├─3109613 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
├─3109614 nginx: worker process
└─3109615 nginx: worker process
Jul 28 11:10:53 server200 systemd[1]: Starting A high performance web server and a reverse proxy server...
Jul 28 11:10:53 server200 systemd[1]: Started A high performance web server and a reverse proxy server.
มูลค่าความสุข
Top comments (0)
Subscribe
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)