洛杉矶MC机房 高速低价18元起

DIYVM

nginx反代问题求解

提示:如果官网是英文页面,建议使用谷歌浏览器能同步翻译页面。点击下载【谷歌浏览器最新绿色便携版】
注意:部分文章发布时间较长,可能存在未知因素,购买时建议在本站搜索商家名称,先充分了解商家动态。
交流:唯一投稿邮箱:hostvps@88.com。

网友 pulpfunction 说:

*帖最后由 pulpfunction 于 2022-6-12 18:19 编辑

plex反代问题:

环境:lnmp 单装nginx,宝塔弃用

思路 :https://hostloc.com/thread-930261-1-1.html   照图里设置了,可能nginx哪里没设置对

现在*****用ip不加端口能访问plex
但是中转***(线路较好)域名访问就是lnmp首页(安装教程此处应该看到plex后台),此时f12看到也是*鸡ip地址

二楼三楼贴俩nginx.conf
xxx.domin.com 为域名

弄好写个保姆级教程

*蛋 域名访问没问题了,现在后台一堆*地回环请求


网友 pulpfunction 说:

plex**鸡:
user  www www;

worker_p**ce**es **to;
worker_cpu_affinity **to;

er**r_log  /home/wwwlogs/nginx_er**r.log  c**t;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file desc**ptors that can be opened by this p**ce**.
worker_rlimit_nofile 51200;

***nts
    {
        use epoll;
        worker_connections 51200;
        multi_accept off;
        accept_mutex off;
    }

http
    {
        include       mime.types;
        def**lt_type  application/octet-stream;

        ******_names_hash_bucket_size 128;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 5000m;
        p**xy_set_header X-Real-IP $remote_addr;
        p**xy_set_header X-Forwarded-For ‘$p**xy_add_x_forwarded_for’;
        p**xy_set_header X-Forwarded-P**to $scheme;
        p**xy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions;
        p**xy_set_header Sec-WebSocket-Key $http_sec_websocket_key;
        p**xy_set_header Sec-WebSocket-Version $http_sec_websocket_version;
        p**xy_cache off;
        p**xy_redirect off;
        p**xy_buffe**ng off;

        sendfile on;
        sendfile_max_c***k 512k;
        tcp_nopush on;

        keepalive_timeout 60;

        tcp_nodelay on;

        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size **k;
        fastcgi_buffers 4 **k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_w**te_size 256k;

        gzip on;
        gzip_min_len***  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.1;
        gzip_comp_l***l 2;
        gzip_types     text/plain application/javasc**pt application/x-javasc**pt text/javasc**pt text/c** application/xml application/xml+r**;
        gzip_vary on;
        gzip_p**xied   expired no-cache no-store p**vate **th;
        gzip_disable   &*uot;MSIE [1-6]\.&*uot;;

        #limit_conn_zone $binary_remote_addr zone=pe**p:10m;
        ##If enable limit_conn_zone,add &*uot;limit_conn pe**p 10;&*uot; to ****** section.

        ******_tokens off;
        acce**_log off;

******
    {
        listen 80 def**lt_****** reuseport;
        #listen [::]:80 def**lt_****** ipv6only=on;
        ******_name _  xxx.domin.com;
        index index.html index.htm index.php;
        **ot  /home/www**ot/def**lt;

        #er**r_page   404   /404.html;

        # Deny acce** to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php.conf;

        location /nginx_status
        {
            stub_status on;
            acce**_log   off;
        }
        

        location / {
            p**xy_pa** http://127.0.0.1:32400/;
            p**xy_set_header X-Forwarded-For $remote_addr;
            p**xy_**l_ve**fy off;
            p**xy_http_version 1.1;
            p**xy_set_header Host $http_host;
            p**xy_set_header Upgrade $http_upgrade;
            p**xy_set_header Connection &*uot;upgrade&*uot;;
            p**xy_read_timeout 8**00;
        }       
        
               
       

        location ~ /\.
        {
            deny all;
        }

        acce**_log  /home/wwwlogs/acce**.log;
    }
include vhost/*.conf;
}


网友 pulpfunction 说:

中转鸡:
user  www www;

worker_p**ce**es **to;
worker_cpu_affinity **to;

er**r_log  /home/wwwlogs/nginx_er**r.log  c**t;

pid        /usr/local/nginx/logs/nginx.pid;

#Specifies the value for maximum file desc**ptors that can be opened by this p**ce**.
worker_rlimit_nofile 51200;

***nts
    {
        use epoll;
        worker_connections 51200;
        multi_accept off;
        accept_mutex off;
    }

http
    {
        include       mime.types;
        def**lt_type  application/octet-stream;

        ******_names_hash_bucket_size 128;
        client_header_buffer_size 32k;
        large_client_header_buffers 4 32k;
        client_max_body_size 50m;

        sendfile on;
        sendfile_max_c***k 512k;
        tcp_nopush on;

        keepalive_timeout 60;

        tcp_nodelay on;

        fastcgi_connect_timeout 300;
        fastcgi_send_timeout 300;
        fastcgi_read_timeout 300;
        fastcgi_buffer_size **k;
        fastcgi_buffers 4 **k;
        fastcgi_busy_buffers_size 128k;
        fastcgi_temp_file_w**te_size 256k;

        gzip on;
        gzip_min_len***  1k;
        gzip_buffers     4 16k;
        gzip_http_version 1.1;
        gzip_comp_l***l 2;
        gzip_types     text/plain application/javasc**pt application/x-javasc**pt text/javasc**pt text/c** application/xml application/xml+r**;
        gzip_vary on;
        gzip_p**xied   expired no-cache no-store p**vate **th;
        gzip_disable   &*uot;MSIE [1-6]\.&*uot;;

        #limit_conn_zone $binary_remote_addr zone=pe**p:10m;
        ##If enable limit_conn_zone,add &*uot;limit_conn pe**p 10;&*uot; to ****** section.

        ******_tokens off;
        acce**_log off;

******
    {
        listen 80 def**lt_****** reuseport;
        #listen [::]:80 def**lt_****** ipv6only=on;
        ******_name _  xxx.domin.com;
        index index.html index.htm index.php;
        **ot  /home/www**ot/def**lt;

        #er**r_page   404   /404.html;

        # Deny acce** to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php.conf;

        location /nginx_status
        {
            stub_status on;
            acce**_log   off;
        }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|c**)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        acce**_log  /home/wwwlogs/acce**.log;
    }
include vhost/*.conf;
}


网友 空灵心梦 说:

*帖最后由 空灵心梦 于 2022-6-12 20:46 编辑
pulpfunction 发表于 2022-6-12 17:50
中转鸡:
网友 pulpfunction 说:

空灵心梦 发表于 2022-6-12 20:43
你这都没填反代的内容吧

我Nginx用的也不太熟,但按照教程里的内容,中转机的******部分应该是这 …
网友 a692830 说:

宝塔是行了


网友 pulpfunction 说:

a692830 发表于 2022-6-13 11:29
宝塔是行了

About 贝壳

【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。

 收藏 (0) 打赏

您可以选择一种方式赞助本站

支付宝扫一扫赞助

微信钱包扫描赞助

本文链接:贝壳主机网 » nginx反代问题求解

分享到: 生成海报
香港/美国/国内高速VPS
切换注册

登录

忘记密码 ?

切换登录

注册

我们将发送一封验证邮件至你的邮箱, 请正确填写以完成账号注册和激活