Skip to content

nickleefly/nginx-proxy-google

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nginx-proxy-google Build Status CircleCI

Inspired by ngx_http_google_filter_module

Base Docker Image

Usage

You can either pull automated build from Docker Hub or build the image by yourself.

Pull from Docker Hub

docker pull nickleefly/nginx-proxy-google

Build the image by yourself

  • Install Docker.

  • Clone this repo

git clone https://github.com/nickleefly/nginx-proxy-google
  • Build an image from Dockerfile
docker build -t nickleefly/nginx-proxy-google .

Run

docker run --restart always -d -p 80:80 -p 443:443 --name nginx nickleefly/nginx-proxy-google

Custom google.conf

Example google.conf

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

About

alpine nginx image with google-proxy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published