alpine nginx google proxy
370
github repo: https://github.com/nickleefly/nginx-proxy-google
Inspired by ngx_http_google_filter_module
You can either pull automated build from Docker Hub or build the image by yourself.
docker pull nickleefly/nginx-proxy-google
Install Docker.
Clone this repo
git clone https://github.com/nickleefly/nginx-proxy-google
docker build -t nickleefly/nginx-proxy-google .
docker run --restart always -d -p 80:80 -p 443:443 --name nginx nickleefly/nginx-proxy-google
server {
listen 80;
server_name example.com;
location / {
google on;
google_scholar on;
google_language "en";
}
# 屏蔽spider
if ($http_user_agent ~* (baiduspider|360spider|haosouspider|googlebot|soso|bing|sogou|yahoo|sohu-search|yodao|YoudaoBot|robozilla|msnbot|MJ12bot|NHN|Twiceler)) {
return 403;
}
}
docker run --restart always -d -p 80:80 -p 443:443 \
-v path/to/google.conf:/etc/nginx/conf.d/google.conf \
--name nginx nickleefly/nginx-proxy-google
Content type
Image
Digest
Size
3.7 MB
Last updated
almost 8 years ago
docker pull nickleefly/nginx-proxy-google