散尽浮华 2023

過去心不可得,現在心不可得,未來心不可得。
安寻安放,不卑不亢;重剑无锋,大巧不工!
  1. 首页
  2. linux
  3. 正文

安装wordpress

2019年1月12日 3886点热度 0人点赞 0条评论
cd /opt
wget https://cn.wordpress.org/wordpress-5.0.3-zh_CN.zip
unzip wordpress-5.0.3-zh_CN.zip
mysql -uroot -p

CREATE DATABASE wordpress CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE USER 'wordpress'@'localhost' IDENTIFIED BY 'wordpress@123$';
GRANT ALL PRIVILEGES ON wordpress.* TO 'wordpress'@'localhost';
FLUSH PRIVILEGES;
EXIT;
vim /etc/nginx/conf.d/wordpress.conf

upstream php-handler {
    server 127.0.0.1:9000;
}

server {
    listen 80;
    server_name t.yjsec.com;
    root /opt/wordpress/;
    add_header Strict-Transport-Security "max-age=15768000;includeSubDomains; preload;";
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;

    index index.php index.html;
    # Load configuration files for the default server block.
    location / {
        try_files $uri $uri/ /index.php?q=$uri&$args;
    }
    location ~ \.php$ {
        fastcgi_pass 127.0.0.1:9000;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location /d {
        autoindex on;
        autoindex_exact_size off;
        autoindex_localtime on;
    }

    error_page 404 /404.html;
    location = /40x.html {
    }
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    }
}


标签: 暂无
最后更新:2019年1月12日

admin

这个人很懒,什么都没留下

点赞
< 上一篇
下一篇 >

文章评论

razz evil exclaim smile redface biggrin eek confused idea lol mad twisted rolleyes wink cool arrow neutral cry mrgreen drooling persevering
取消回复

COPYRIGHT © 2023 散尽浮华 2023. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang