TP-Admin V5 简介
TP-Admin V5 正式公测,欢迎大家前来体验 点击体验
最新系统请到群文件中获取(群号:495760597)
红海螺CMS(TP-Admin V5)是一个拥有站群功能的多功能CMS基础系统,底层融合了Slim 2.6和ThinkPHP 3.2两个框架,在此基础上改造了MVC结构、泛域名匹配机制、在MVC的基础上新增Logic层、重构路由机制实现与当下主流的开源框架(如:laravel,YII等)路由机制相类似的RESTful。能帮助你快速构建大型门户站点,以及快速的开发一个简单但是强大的WEB应用以及API接口。点击下面链接了解更多:
该文档是项目V5.x分支特性
对服务器环境要求
TP-Admin 系统对系统环境有如下要求:
- Apache | Nginx 重写
- VHOST 支持 (TP-Admin V5必须配置VHOST以使用它的全部功能)
- PHP >= 5.4
- MCrypt PHP 扩展
- CURL PHP 扩展
安装
TP-Admin V5 自带自动安装程序,在配置好虚拟主机之后直接访问 /install/index.php 来执行安装程序。(虚拟主机配置请参考 服务器配置)
配置
TP-Admin V5 入口文件是 /Public/index.php,请将DocumentRoot指向到 /Public/ ;
# Apache 服务器
## 重写配置
系统通过设置 public/.htaccess
文件去除链接中的index.php
。 如果你你的服务器使用的是 Apache,请确保开启 mod_rewrite
模块。
如果系统附带的 .htaccess
文件在你的Apache环境中不起作用,请尝试下面这个版本:
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
## VHost设置
<VirtualHost *:80>
ServerName www.tp5.hhailuo.com
ServerAlias *.tp5.hhailuo.com
DocumentRoot d:/wamp64/www/tp5/Public
<Directory "d:/wamp64/www/tp5/Public/">
Options Indexes FollowSymLinks
AllowOverride All
Require local
</Directory>
</VirtualHost>
# Nginx 服务器
## 重写配置
如果是 Nginx 服务器,将下列指令放到网址的配置文件中,就能让网址更优雅了:
location / {
try_files $uri $uri/ /index.php?$query_string;
}
## VHost 配置
server { listen 80; server_name tp5.hhailuo.com *.tp5.hhailuo.com; index index.html index.php; root /var/www/tp3/Public/; if ($host = 'tp5.hhailuo.com' ) { rewrite ^/(.*)$ http://www.tp5.hhailuo.com/$1 permanent; } location / { try_files $uri $uri/ /index.php?$query_string; } location /index.php { include fastcgi_params; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; } location ~ .*\.(xml|gif|jpg|jpeg|png|bmp|swf|woff|woff2|ttf|js|css)$ { expires 30d; } error_log /var/log/nginx/hhailuo/error.log; access_log /var/log/nginx/hhailuo/access.log; }