正文  软件开发 > PHP编程技术 >

EmpireCMS的使用,EmpireCMS使用

EmpireCMS的使用,EmpireCMS使用1.下载安装empirecms 下载完成后解压将upload目录整体上传到服务器,并更名为empirecms_test 更改目录文件的权限: ch...

EmpireCMS的使用,EmpireCMS使用

1.下载安装empirecms

下载完成后解压将upload目录整体上传到服务器,并更名为empirecms_test

更改目录文件的权限:

chmod -R 777 empirecms_test

配置好web服务器可以访问empirecms_test:

server {
root C:/Users/liudaoqiang/project_test/empirecms_tes;
index index.php index.html;
server_name dev.empirecms_test.com;
# set $yii_bootstrap "index.html";
set $yii_bootstrap "index.php";

charset utf-8;

location / {
index $yii_bootstrap;
try_files $uri $uri/ $yii_bootstrap?$args;
if (!-e $request_filename) {
rewrite (.*) /index.php/$1;
}
}

location ~ ^/(protected|framework|nbproject|themes/w+/views) {
deny all;
}

location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$ {
expires 30d;
}

location ~ .*.(js|css)?$ {
expires 7d;
}

#avoid processing of calls to unexisting static files by yii
location ~ .(js|css|png|jpg|gif|swf|ico|pdf|mov|fla|zip|rar)$ {
try_files $uri =404;
}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ .php$ {

fastcgi_split_path_info ^(.+.php)(.*)$;

#let yii catch the calls to unexising PHP files
set $fsn /$yii_bootstrap;
if (-f $document_root$fastcgi_script_name){
set $fsn $fastcgi_script_name;
}

#fastcgi_next_upstream error timeout invalid_header http_500 http_503 http_404;
#fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fsn;

#PATH_INFO and PATH_TRANSLATED can be omitted, but RFC 3875 specifies them for CGI
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fsn;

}

location ~ /.ht {
deny all;
}
}

在hosts文件中加入该域名:

127.0.0.1 dev.empirecms_test.com

启动php-fpm及nginx:

@echo off
echo Starting PHP FastCGI...
RunHiddenConsole.exe D:/php5/php-cgi.exe -b 127.0.0.1:9000 -c D:/php5/php.ini
Exit

start nginx

nginx -s reload

访问dev.empirecms_test.com/e/install安装empirecms,完成数据库表结构的导入和后台管理员账号的配置:

访问dev.empirecms_test.com/e/admin登录后台管理系统初始化内置的测试数据:

刷新完毕后,发现在empirecms_test的根目录下多了 article, download, flash, news, movie, photo等目录

访问前台首页dev.empirecms_test.com/index.html

删除dev.empirecms_test.com/e/install目录,防止再次被安装覆盖:

http://www.bkjia.com/PHPjc/1223419.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/1223419.htmlTechArticleEmpireCMS的使用,EmpireCMS使用 1.下载安装empirecms 下载完成后解压将upload目录整体上传到服务器,并更名为empirecms_test 更改目录文件的权限:...