由于oneinstack已經(jīng)有了php和nginx,所以不重復(fù)安裝路克。
1.下載ecshop3.6源碼
image.png
2. 上傳服務(wù)器
將ecshop下的文件上傳到服務(wù)器 /data/wwwroot/ecshop
目錄下
將appserver下的文件上傳到服務(wù)器/data/wwwroot/appserver
目錄下
3. 啟動(dòng)php-cgi
編寫腳本php-start.sh
#bin/bash
nohup php-cgi -b 127.0.0.1:9000 &
運(yùn)行腳本
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. 訪問(wèn)
打開瀏覽器訪問(wèn) http://shop.xxx.com
即可