由于oneinstack已经有了php和nginx,所以不重复安装。
1.下载ecshop3.6源码
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
即可