共计 6976 个字符,预计需要花费 18 分钟才能阅读完成。
plex 反代问题: 环境:lnmp 单装 nginx,宝塔弃用 思路:https://hostloc.com/thread-930261-1-1.html 照图里设置了,可能 nginx 哪里没设置对 现在解码服务器用 ip 不加端口能访问 plex 二楼三楼贴俩 nginx.conf 弄好写个保姆级教程 妈蛋 域名访问没问题了,现在后台一堆本地回环请求 |
网友回复:
注册 : plex 解码鸡:user www www; worker_processes auto; worker_cpu_affinity auto; error_log /home/wwwlogs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 51200; events {use epoll; worker_connections 51200; multi_accept off; accept_mutex off;} http {include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; client_header_buffer_size 32k; large_client_header_buffers 4 32k; client_max_body_size 5000m; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For ‘$proxy_add_x_forwarded_for’; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions; proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key; proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version; proxy_cache off; proxy_redirect off; proxy_buffering off; sendfile on; sendfile_max_chunk 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 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 256k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable “MSIE [1-6].”; #limit_conn_zone $binary_remote_addr zone=perip:10m; ##If enable limit_conn_zone,add “limit_conn perip 10;” to server section. server_tokens off; access_log off; server {listen 80 default_server reuseport; #listen [::]:80 default_server ipv6only=on; server_name _ xxx.domin.com; index index.html index.htm index.php; root /home/wwwroot/default; #error_page 404 /404.html; # Deny access 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; access_log off;} location / {proxy_pass http://127.0.0.1:32400/; proxy_set_header X-Forwarded-For $remote_addr; proxy_ssl_verify off; proxy_http_version 1.1; proxy_set_header Host $http_host; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; proxy_read_timeout 86400;} location ~ /. {deny all;} access_log /home/wwwlogs/access.log; } include vhost/*.conf; } 复制代码
pulpfunction: 中转鸡:user www www; worker_processes auto; worker_cpu_affinity auto; error_log /home/wwwlogs/nginx_error.log crit; pid /usr/local/nginx/logs/nginx.pid; #Specifies the value for maximum file descriptors that can be opened by this process. worker_rlimit_nofile 51200; events {use epoll; worker_connections 51200; multi_accept off; accept_mutex off;} http {include mime.types; default_type application/octet-stream; server_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_chunk 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 64k; fastcgi_buffers 4 64k; fastcgi_busy_buffers_size 128k; fastcgi_temp_file_write_size 256k; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_http_version 1.1; gzip_comp_level 2; gzip_types text/plain application/javascript application/x-javascript text/javascript text/css application/xml application/xml+rss; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_disable “MSIE [1-6].”; #limit_conn_zone $binary_remote_addr zone=perip:10m; ##If enable limit_conn_zone,add “limit_conn perip 10;” to server section. server_tokens off; access_log off; server {listen 80 default_server reuseport; #listen [::]:80 default_server ipv6only=on; server_name _ xxx.domin.com; index index.html index.htm index.php; root /home/wwwroot/default; #error_page 404 /404.html; # Deny access 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; access_log off;} location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ {expires 30d;} location ~ .*.(js|css)?$ {expires 12h;} location ~ /.well-known {allow all;} location ~ /. {deny all;} access_log /home/wwwlogs/access.log; } include vhost/*.conf; } 复制代码
pulpfunction: 你这都没填反代的内容吧 我 Nginx 用的也不太熟,但按照教程里的内容,中转机的 server 部分应该是这样填的吧,忽略我的缩进问题 server {listen 80 default_server reuseport; #listen [::]:80 default_server ipv6only=on; server_name _ xxx.domin.com; index index.html index.htm index.php; root /home/wwwroot/default; #error_page 404 /404.html; # Deny access 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; access_log off;} client_max_body_size 5000M; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For ‘$proxy_add_x_forwarded_for’; proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header Sec-WebSocket-Extensions $http_sec_websocket_extensions; proxy_set_header Sec-WebSocket-Key $http_sec_websocket_key; proxy_set_header Sec-WebSocket-Version $http_sec_websocket_version; proxy_cache off; proxy_redirect off; proxy_buffering off; location / {proxy_pass https://xxx.domin.com/; proxy_set_header X-Forwarded-For $remote_addr; proxy_ssl_verify off; proxy_http_version 1.1; proxy_set_header Host xxx.domin.com; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection “upgrade”; proxy_read_timeout 86400;} location ~ /.well-known {allow all;} location ~ /. {deny all;} access_log /home/wwwlogs/access.log; } 复制代码
pulpfunction: 我复制错文件了 实际 改了 能参考你的配置文件吗大佬
空灵心梦 : 宝塔是行了
pulpfunction: 不用后门塔
a692830: 我的配置文件跟你看的教程里是一样的,除了 client_max_body_size 我中转机填的是 0,可能因为我用的是宝塔,反代部分没遇到啥问题
pulpfunction: 域名访问时候 f12 能看到解码机地址吗
空灵心梦 : 只能看到反代机的地址
注册 : 已经解决了谢了 顺道瞎写了个教程
注册 : 刷到了你的帖子,支持楼主,教程贴多多益善