wordpress的sakurairo主题
apt -y install git git clone https://github.com/mirai-mamori/Sakurairo.git
wordpress下载
wget https://cn.wordpress.org/latest-zh_CN.tar.gz tar xf latest-zh_CN.tar.gz
将主题移到/var/www/html/wp-content/themes/下
lnmp配置
ubuntu系统配置
apt -y install mysql-server php php-fpm php-mysql nginx
mysql
mysql登录
mysql create user wordpress@'localhost' identified by '123456'; create database wordpress; grant all on wordpress.* to wordpress@'localhost';
nginx配置
root@ubuntu:/etc/nginx/conf.d# vim www.conf server { listen 80; listen 443 ssl; server { listen 80; listen 443 ssl; server { listen 80; listen 443 ssl; ssl_certificate /data/ssl/7459769_www.myisdzx.top.pem; #ssl认证文件路径 ssl_certificate_key /data/ssl/7459769_www.myisdzx.top.key; #ssl认证文件路径 ssl_session_cache shared:sslcache:20m; ssl_session_timeout 10m; server_name www.myisdzx.top; root /var/www/html; #webj文件跟目录 index index.php client_max_body_size 200M; location / { if ( $scheme = http ) { rewrite ^/(.*)$ https://www.myisdzx.top/$1 redirect; } root /var/www/html; } #location / { # rewrite ^/(.*)$ https://$host/$1 redirect; #} location ~ \.php$ { root /var/www/html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } location ~ ^/(ping|fpm_status)$ { fastcgi_pass 127.0.0.1:9000; #php连接端口 fastcgi_param PATH_TRANSLATED $document_root$fastcgi_script_name; include fastcgi_params; } }
配置php-fpm
vim /etc/php/7.4/fpm/pool.d/www.conf ;listen = /run/php/php7.4-fpm.sock listen = 127.0.0.1:9000 systemctl restart php7.4-fpm.service
报错处理
2022/03/22 15:04:25 [warn] 38012#38012: conflicting server name "www.myisdzx.top" on 0.0.0.0:80, ignored
处理方法;
netstat -natulp
看看是不是apach2打开了
apt -y remove apach2