从零开始的Linux运维屌丝之路,资源免费分享平台   运维人员首选:简单、易用、高效、安全、稳定、社区活跃的开源软件

nginx代理其他域名

发布:蔺要红04-26分类: Nginx

server {
    listen 80;
    listen 443 ssl http2;
    server_name  yaohong.xxx.com;
    ssl_certificate  /etc/nginx/ssl/2023ingeek.com.crt;
    ssl_certificate_key /etc/nginx/ssl/2023ingeek.com.key;
    ssl_session_timeout 5m;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3;
    ssl_prefer_server_ciphers on;

    location / {
      proxy_set_header Host $proxy_host;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_pass  https://www.baidu.com/;
      }

}
温馨提示如有转载或引用以上内容之必要,敬请将本文链接作为出处标注,如有侵权我会在24小时之内删除!

欢迎使用手机扫描访问本站