在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):cuber/ngx_http_google_filter_module开源软件地址(OpenSource Url):https://github.com/cuber/ngx_http_google_filter_module开源编程语言(OpenSource Language):C 100.0%开源软件介绍(OpenSource Introduction):Nginx Module for GoogleDescription
location / {
google on;
}
https://g2.wen.luDemo siteDependency
InstallationDownload sources first
Brand new installation#
# configure nginx customly
# replace </path/to/> with your real path
#
./configure \
<your configuration> \
--add-module=</path/to/>ngx_http_google_filter_module \
--add-module=</path/to/>ngx_http_substitutions_filter_module Migrate from existed distribution#
# get the configuration of existed nginx
# replace </path/to/> with your real path
#
</path/to/>nginx -V
> nginx version: nginx/ <version>
> built by gcc 4.x.x
> configure arguments: <configuration>
#
# download the same version of nginx source
# @see http://nginx.org/en/download.html
# replace <version> with your nginx version
#
wget http://nginx.org/download/nginx-<version>.tar.gz
#
# configure nginx
# replace <configuration> with your nginx configuration
# replace </path/to/> with your real path
#
./configure \
<configuration> \
--add-module=</path/to/>ngx_http_google_filter_module \
--add-module=</path/to/>ngx_http_substitutions_filter_module
#
# if some libraries were missing, you should install them with the package manager
# eg. apt-get, pacman, yum ...
# UsageBasic Configuration
server {
# ... part of server configuration
resolver 8.8.8.8;
location / {
google on;
}
# ...
} Google Scholar
location / {
google on;
google_scholar on;
} Google LanguageThe default language can be set through location / {
google on;
google_scholar on;
# set language to German
google_language de;
} Supported languages are listed below.
Spider ExclusionThe spiders of any search engines are not allowed to crawl google mirror.
If #...
location / {
google on;
google_robots_allow on;
}
#... Upstreaming
upstream www.google.com {
server 173.194.38.1:443;
server 173.194.38.2:443;
server 173.194.38.3:443;
server 173.194.38.4:443;
} Proxy ProtocolBy default, the proxy will use #
# eg.
# i want to proxy the domain 'www.google.com' like this
# vps(hk) -> vps(us) -> google
#
#
# configuration of vps(hk)
#
server {
# ...
location / {
google on;
google_ssl_off "www.google.com";
}
# ...
}
upstream www.google.com {
server < ip of vps(us) >:80;
}
#
# configuration of vps(us)
#
server {
listen 80;
server_name www.google.com;
# ...
location / {
proxy_pass https://www.google.com;
}
# ...
} Copyright & LicenseAll codes are under the same LICENCE with Nginx |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论