阿里云搭建lnmp的wordpress
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/下
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; } }
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
原文链接:https://blog.csdn.net/qq_58959111/article/details/124024304?ops_request_misc=%257B%2522request%255Fid%2522%253A%2522166666867416782391880922%2522%252C%2522scm%2522%253A%252220140713.130102334.pc%255Fblog.%2522%257D&request_id=166666867416782391880922&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~first_rank_ecpm_v1~times_rank-30-124024304-null-null.nonecase&utm_term=wordpress
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。