# vim: ft=nginx: # Sample configuration for ngx_http_google_filter_module # This file should be included in an `http` context # See also: https://github.com/cuber/ngx_http_google_filter_module server { listen 80; listen 443 ssl; # You can generate self-signed certificate and key with one command: # openssl req -x509 -newkey rsa:2048 -nodes -keyout google.example.org.key -out google.example.org.crt -days 30 -subj /CN=google.example.org/ # But it's strongly recommended to get a valid certificate. server_name google.example.org; ssl_certificate google.example.org.crt; ssl_certificate_key google.example.org.key; # Improve TLS performance and security ssl_session_cache shared:SSL:10m; ssl_protocols TLSv1.2; ssl_ciphers ECDHE+AES; ssl_prefer_server_ciphers on; # Google on! location / { google on; google_scholar on; google_language en; } # `resolver` is needed to resolve domains. resolver 8.8.8.8; # `upstream` can help you to avoid name resolving cost, decrease the # possibility of google robot detection and proxy through some # specific servers. #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; #} }