找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 93|回复: 0

安装Wordpress ,实施一机双站

[复制链接]

25

主题

12

回帖

169

积分

超级版主

积分
169
发表于 2025-7-1 13:02:22 | 显示全部楼层 |阅读模式
在原来基础上只需要修改nginx.conf

对应好网站文件夹的路径,其他和建Discuz没什么区别
  1. server {
  2.         listen  80 default_server;
  3.                 server_name localhost;
  4.                 root   /var/www/html/discuz;

  5.                 location / {
  6.                     index index.php index.html index.htm;
  7.                     autoindex off;
  8.                 }
  9.                
  10.                 location ~ \.php(.*)$
  11.                
  12.                 {
  13.                     root   /var/www/html/discuz;
  14.                     fastcgi_pass php-7.4-fpm:9000;
  15.                     fastcgi_index index.php;
  16.                     fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
  17.                     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  18.                     fastcgi_param PATH_INFO $fastcgi_path_info;
  19.                     fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  20.                     include  fastcgi_params;
  21.                 }
  22. }
  23. server {
  24.         listen  88 default_server;
  25.                 server_name localhost;
  26.                 root   /var/www/html/wordpress;

  27.                 location / {
  28.                     index index.php index.html index.htm;
  29.                     autoindex off;
  30.                 }
  31.                
  32.                 location ~ \.php(.*)$
  33.                
  34.                 {
  35.                     root   /var/www/html/wordpress;
  36.                     fastcgi_pass php-7.4-fpm:9000;
  37.                     fastcgi_index index.php;
  38.                     fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
  39.                     fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  40.                     fastcgi_param PATH_INFO $fastcgi_path_info;
  41.                     fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
  42.                     include  fastcgi_params;
  43.                 }
  44. }
复制代码
wordpress数据库要先对phpmyadmin建立,再安装
其中跳过FTP在wp-config.php 文件末尾加上
  1. define('FS_METHOD', 'direct');
复制代码



您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Home!

GMT+8, 2025-12-6 11:45 , Processed in 0.014175 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2025 Discuz! Team.

快速回复 返回顶部 返回列表