zoukankan      html  css  js  c++  java
  • lnmp wordpress...

    lnmp略

    /etc/nginx/conf.d/default.conf 

    -------------------------------------------

    server {
    listen 80;
    server_name localhost;
    root /usr/share/nginx/html/wordpress;
    index index.php;
    location ~ .php$ {
    root /usr/share/nginx/html/wordpress;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
    location /status {
    stub_status;
    access_log off;
    deny 10.0.0.1;
    allow all;
    }
    error_page 500 502 503 504 /50x.html;
    location = /50x.html {
    root /usr/share/nginx/html;
    }
    }

    -------------------------------------------

    nginx -t

    unzip wordpress.zip到/usr/share/nginx/html目录中

    修改nginx、php-fpm配置中的操作用户

    groupadd -g 666 www

    useradd -g 666 -u 666 -M -s /sbin/nologin www

    chown -R www.www wordpress

    sed -i '/^user/c user www;' /etc/nginx/nginx.conf  以user开头的整行替换c后面的 

    sed -i '/^group/c guoup = www ' /etc/php-fpm.d/www.conf

    sed -i '/^user/c user = www ' /etc/php-fpm.d/www.conf

    创建数据库

    MariaDB [(none)]> create database wordpress;
    Query OK, 1 row affected (0.00 sec)

    systemctl reload nginx php-fpm

    ss -lntup|egrep '3306|80|9000'

  • 相关阅读:
    Java Web编程的主要组件技术——JSP
    Java Web编程的主要组件技术——Servlet
    closest()一个在评论里很有用的函数
    ThinkPHP I方法
    PHPstorm 的快捷键
    ThinkPHP的缓存 F方法
    console.log的使用
    选择使用接口和抽象类的依据
    OOP三类继承的区别
    Thinkphp C方法
  • 原文地址:https://www.cnblogs.com/Leaders543/p/12496984.html
Copyright © 2011-2022 走看看