创建网站与数据库步骤

来源:互联网 发布:阿里云华北2速度 编辑:程序博客网 时间:2024/06/05 17:41
246
数据库:root/root
数据库访问地址:http://www.foodmate.cc/god/

记得要在mysql数据库里执行命令


create database tjj default charset utf8;

grant all on tjj.* to tianjiaji@localhost identified by "4acfb9baa8";

flush privileges;





创建用户
useradd -s /sbin/nologin malla
修改密码
passwd malla
创建虚拟主机
在:vi /usr/local/nginx/conf/nginx.conf
 server
  {
    listen       80;
    server_name  malla.foodmate.cc;
    index index.html index.htm index.php;
    root  /home/malla;


    #limit_conn   crawler  20;


    location ~ .*\.(php|php5)?$
    {
      #fastcgi_pass  unix:/tmp/php-cgi.sock;
      fastcgi_pass  127.0.0.1:9000;
      fastcgi_index index.php;
      include fcgi.conf;
    }







查看加载的是否正确:
/usr/local/nginx/sbin/nginx -t
/usr/local/nginx/sbin/nginx -s reload


安装后的访问地址:
http://malla.foodmate.cc
修改权限:chmod -R 777 malla



原创粉丝点击