跳至主要內容
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?

4563博客

全新的繁體中文 WordPress 網站
  • 首頁
  • (江湖救急令)多网站反代+套CF,都是WP程序,伪静态出问题
未分類
16 11 月 2021

(江湖救急令)多网站反代+套CF,都是WP程序,伪静态出问题

leftgg 大佬有话说 :

(江湖救急令)多网站反代+套CF,都是WP程序,伪静态出问题

本帖最后由 leftgg 于 2021-11-15 15:02 编辑

后端服务器X (网站A,网站B,网站C)
前端服务器Y(网站A,网站B,网站C)
然后在套CF(网站A,网站B,网站C)

宝塔WORDPRESS伪静态无法保存,出现如下错误
ERROR:
nginx: duplicate location "/" in /www/server/panel/vhost/rewrite/域名.com.conf:2
nginx: configuration file /www/server/nginx/conf/nginx.conf test failed

wp的伪静态规则
location /
{
       try_files $uri $uri/ /index.php?$args;
}

rewrite /wp-admin$ $scheme://$host$uri/ permanent;

后端服务器X IP 62.21.28.1
难道是前端服务器Y /etc/hosts里面配置的有问题吗?

62.21.28.1域名a.com
62.21.28.1域名b.com
62.21.28.1域名c.com

darius 大佬有话说 :

给你提醒了,/重复了,你看还在哪配了

0nline 大佬有话说 :

location后面加空格

leftgg 大佬有话说 :

0nline 大佬有话说 : 2021-11-15 15:04
location后面加空格

有空格的,而且直接用官方,我没有任何改动的

leftgg 大佬有话说 :

darius 大佬有话说 : 2021-11-15 15:03
给你提醒了,/重复了,你看还在哪配了

nginx.conf这个里面查找是否有 /重复吗?

李云龙 大佬有话说 :

这个就不知道了

0nline 大佬有话说 :

屏蔽下敏感词,贴出来看看。

leftgg 大佬有话说 :

0nline 大佬有话说 : 2021-11-15 15:11
屏蔽下敏感词,贴出来看看。

还需要贴啥?我没有改任何东西呀除了域名和IP

leftgg 大佬有话说 :

0nline 大佬有话说 : 2021-11-15 15:11
屏蔽下敏感词,贴出来看看。

/www/server/nginx/conf/nginx.conf

userwww www;
worker_processes auto;
error_log/www/wwwlogs/nginx_error.logcrit;
pid      /www/server/nginx/logs/nginx.pid;
worker_rlimit_nofile 51200;

stream {
    log_format tcp_format ‘$time_local|$remote_addr|$protocol|$status|$bytes_sent|$bytes_received|$session_time|$upstream_addr|$upstream_bytes_sent|$upstream_bytes_received|$upstream_connect_time’;

    access_log /www/wwwlogs/tcp-access.log tcp_format;
    error_log /www/wwwlogs/tcp-error.log;
    include /www/server/panel/vhost/nginx/tcp/*.conf;
}

events
    {
      use epoll;
      worker_connections 51200;
      multi_accept on;
    }

http
    {
      include       mime.types;
                #include luawaf.conf;

                include proxy.conf;

      default_typeapplication/octet-stream;

      server_names_hash_bucket_size 512;
      client_header_buffer_size 32k;
      large_client_header_buffers 4 32k;
      client_max_body_size 50m;

      sendfile   on;
      tcp_nopush on;

      keepalive_timeout 60;

      tcp_nodelay on;

      fastcgi_connect_timeout 7200;
      fastcgi_send_timeout 7200;
      fastcgi_read_timeout 7200;
      fastcgi_buffer_size 64k;
      fastcgi_buffers 4 64k;
      fastcgi_busy_buffers_size 128k;
      fastcgi_temp_file_write_size 256k;
                fastcgi_intercept_errors on;

      gzip on;
      gzip_min_length1k;
      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;
      gzip_vary on;
      gzip_proxied   expired no-cache no-store private auth;
      gzip_disable   "MSIE .";

      limit_conn_zone $binary_remote_addr zone=perip:10m;
                limit_conn_zone $server_name zone=perserver:10m;

      server_tokens off;
      access_log off;

server
    {
      listen 888;
      server_name phpmyadmin;
      index index.html index.htm index.php;
      root/www/server/phpmyadmin;
            location ~ /tmp/ {
                return 403;
            }

      #error_page   404   /404.html;
      include enable-php.conf;

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

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

      location ~ /.
      {
            deny all;
      }

      access_log/www/wwwlogs/access.log;
    }
include /www/server/panel/vhost/nginx/*.conf;
}

0nline 大佬有话说 :

https://blog.csdn.net/sunsineq/article/details/115942537
自己看吧。

文章導覽

上一篇文章
下一篇文章

AD

其他操作

  • 登入
  • 訂閱網站內容的資訊提供
  • 訂閱留言的資訊提供
  • WordPress.org 台灣繁體中文

51la

4563博客

全新的繁體中文 WordPress 網站
返回頂端
本站採用 WordPress 建置 | 佈景主題採用 GretaThemes 所設計的 Memory
4563博客
  • Hostloc 空間訪問刷分
  • 售賣場
  • 廣告位
  • 賣站?
在這裡新增小工具