oneinstack部署ecshop3.6

由于oneinstack已经有了php和nginx,所以不重复安装。

1.下载ecshop3.6源码

image.png

2. 上传服务器

将ecshop下的文件上传到服务器 /data/wwwroot/ecshop目录下
将appserver下的文件上传到服务器/data/wwwroot/appserver目录下

3. 启动php-cgi

编写脚本php-start.sh

#bin/bash
nohup php-cgi -b 127.0.0.1:9000 &

运行脚本

sh php-start.sh

4.配置nginx

server
{
listen 80;
server_name shop.xxx.com;
index index.php index.html;
root /data/wwwroot/shop.xxx.com/;

     location / {
         try_files $uri $uri/ /index.php?$args;
     }

     location ~ [^/]\.php(/|$)
     {
         try_files $uri =404;
         fastcgi_pass 127.0.0.1:9000;
         fastcgi_index index.php;
         include fastcgi.conf;
     }
     location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
     {
         expires   30d;
     }
     location ~ .*\.(js|css)?$
     {
         expires   12h;
     }
 }

5. 访问

打开浏览器访问 http://shop.xxx.com即可

你可能感兴趣的:(oneinstack部署ecshop3.6)