Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- upstream proxy-www.example.com {
- server 192.168.aa.bb;
- }
- # upstream proxy-mail.example.com {
- # server 192.168.aa.cc;
- # }
- upstream proxy-mirror.example.com {
- server 192.168.aa.dd;
- }
- # ##
- # # Logging Settings
- # ##
- # access_log /var/log/nginx/access.log;
- # error_log /var/log/nginx/error.log debug;
- server {
- # сначала по книжке, ISBN 978-5-94074-961-5, стр. 99
- # listen 443 default ssl;
- listen 443 ssl;
- # два хостнейма, см. https://habr.com/post/142363/
- # server_name host04.example.com host05.example.com;
- # server_name host06.example.com;
- ssl on;
- #ssl_prefer_server_ciphers on;
- #ssl protocols TLSv1 SSLv3;
- #ssl_ciphers RC4:HIGH:!aNUL:!MD5:@STRENGTH;
- #ssl_session_cache shared:WEB 10m;
- ssl_certificate /path/to/crt.crt;
- ssl_certificate_key /path/to/key.txt;
- location / {
- # http://nginx.org/ru/docs/http/ngx_http_core_module.html#resolver
- # http://nginx.org/ru/docs/http/ngx_http_proxy_module.html#proxy_pass
- # выкинули из DNS-серверов, будем настраивать с помощью групп upstream -- так проще
- # resolver 8.8.8.8;
- # dig -t SOA example.com
- # resolver ns3-l2.nic.ru;
- # https://sysadmin.ru/articles/oshibka-nginx-upstream-sent-too-big-header-while-reading-response-header-from-upstream
- # fastcgi_buffers 16 16k;
- # fastcgi_buffer_size 32k;
- # https://stackoverflow.com/questions/13894386/upstream-too-big-nginx-codeigniter
- proxy_buffer_size 128k;
- proxy_buffers 4 256k;
- proxy_busy_buffers_size 256k;
- # https://serveradmin.ru/nginx-proxy_pass/
- proxy_pass http://proxy-$host;
- proxy_set_header X-FORWARDED-PROTO https;
- proxy_set_header Host $host;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Real-IP $remote_addr;
- }
- }
- }
Add Comment
Please, Sign In to add comment