安装wordpress+网页伪静态

搭建博客:

[root@web02 /server/tools]# rz -y
rz waiting to receive.
[root@web02 /server/tools]# ls
libiconv-1.16                               nginx-1.16.0         php-7.3.5.tar.gz
libiconv-1.16.tar.gz                        nginx-1.16.0.tar.gz  wordpress-5.1.1.zip
mysql-5.7.26-linux-glibc2.12-x86_64.tar.gz  php-7.3.5
[root@web02 /server/tools]# unzip wordpress-5.1.1.zip 
[root@web02 /server/tools]# mv wordpress/* /application/nginx/html/blog/
[root@web02 /server/tools]# chown -R nginx.nginx /application/nginx/html/blog/ (暂时性)
[root@web02 /server/tools]# ls -ld /application/nginx/html/blog/
drwxr-xr-x 5 nginx nginx 4096 5月   7 09:14 /application/nginx/html/blog/


打开网页安装:

伪静态:插入高亮部分即可

安装wordpress+网页伪静态_第1张图片
image.png
[root@web01 /application/nginx/html/blog]# cat /application/nginx/conf/extra/03_blog.conf
/*server {
    listen       80;
    server_name  blog.etiantian.org;
    location / {
        root   html/blog;
        index  index.php index.html index.htm; */
        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php;
        } 
/*
    }
    location ~ \.php$ {
        root   html/blog;
        fastcgi_pass   127.0.0.1:9000;
        fastcgi_index  index.php;
        include fastcgi.conf;
    }
}

你可能感兴趣的:(安装wordpress+网页伪静态)