Search

搭建WordPress 网站配置

PHP

  1. WARNING: [pool www] seems busy (you may need to increase pm.start_servers, or pm.min/max_spare_servers), spawning 32 children, there are 0 idle, and 95 total children
    1. 解答
      PHP 进程在无限期运行时并不是特别可靠。您应该配置 php-fpm 以不时重启工作进程。尝试改变;pm.max_requests = 500

      进入pm.max_requests = 500  作为一个开始。这可能无法解决所有问题,因为您可能还有其他配置问题,但更改 max_requests 是一个好的开始。我的服务器已经运行了几个月,没有任何停机时间。

  2. 1

WordPress

  1. 编辑器tinymce的默认字体Georgia

    修改文件:/wp-includes/js/tinymce/skins/wordpress/wp-content.css
    CSS
    body {
    font-family: Georgia;
    替换为:
    CSS
    body {
    font-family: 微软雅黑;

  2. head.php

    1. wordpress任意页面点击打开新窗口的方法
      到后台——外观——修改主题文件,打开header.php,打开之后在  </head>下面添加一行<base target=_blank //>
    2. 1
    3. sd
    4. ws

      1

    1.  
  1. te
  2. dd

 

Nginx 配置

  1. 反向代理

 

    1. 反向代理指代理后端服务器响应客户端请求的一个中介服务器,代理的对象是服务端
      server {
      listen 80;
      server_name 192.168.4.32; #监听地址

          location / {
          root html; #/html目录
          proxy_pass http://127.0.0.1:8080; #请求转向
           index index.html index.htm; #设置默认页
         }
      }

    2. 根据在浏览器输入的路径不同,跳转到不同端口的服务中。
          server {
              listen       9000;   
              server_name  192.168.4.32;   #监听地址       
              
              location  ~ /example1/ {  
                 proxy_pass http://127.0.0.1:5000;         
              } 
      
              location  ~ /example2/ {  
                 proxy_pass http://127.0.0.1:8080;         
              } 
          }

      location 指令说明:
      ~ : 表示uri包含正则表达式,且区分大小写。
      ~* : 表示uri包含正则表达式,且不区分大小写。
      = : 表示uri不含正则表达式,要求严格匹配。

    3. 负载均衡
      实现效果:
      在浏览器地址栏输入 http://192.168.4.32/example/a.html ,平均到 5000 和 8080 端口中,实现负载均衡效果。

      • nginx 分配服务器策略

        轮询(默认)
        按请求的时间顺序依次逐一分配,如果服务器down掉,能自动剔除。
        权重
        weight 越高,被分配的客户端越多,默认为 1。比如:
        upstream myserver {
        server 192.167.4.32:5000 weight=10;
        server 192.168.4.32:8080 weight=5;
        }

        server {
        listen 80; #监听端口
        server_name 192.168.4.32; #监听地址

        location / {
        root html; #html目录
        index index.html index.htm; #设置默认页
        proxy_pass http://myserver; #请求转向 myserver 定义的服务器列表
        }
        }

      • dsfs
      • f
    4.  
    5.  
    6.  
    7. dsf
    8. sdfs
    9. ds
    10. fds
  1. sdsd

  2. 23
  3.  

 

目录