需求分析 只须要测试lamp环境运行 php
目标 快速安装lamp环境html
phpstudy一键按装mysql
phpStudy for Linux 支持Apache/Nginx/Tengine/Lighttpd,
支持php5.2/5.3/5.4/5.5切换
已经在centos-6.5,debian-7.4.,ubuntu-13.10测试成功。nginx
下载版:http://lamp.phpstudy.net/phpstudy.binsql
完整版:http://lamp.phpstudy.net/phpstudy-all.binthinkphp
安装:ubuntu
wget -c http://lamp.phpstudy.net/phpstudy.bin
chmod +x phpstudy.bin #权限设置
./phpstudy.bin #运行安装centos
需求 在线运行并须要各类配置 框架
目标 手动搭建lamp环境测试
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
thinkphp重写配置 ( 配置环境: centos6 phpstudy php5 mysql5 nginx )
URL REWRITE 模式 REWRITE 模式也称 URL重写, 可用于隐藏 PATHINFO 模式路径中的 index.php, 开启 REWRITE 模式的 Nginx 配置为: server { listen 80; server_name localhost; location / { root D:/Projects/Demo/thinkphp; # 你的 TP 框架 index.php 所在目录, 记得用 / 分割路径 index index.php index.html index.htm; try_files $uri $uri/ /index.php?s=$uri; # 核心 } # ... # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { root D:/Projects/Demo/thinkphp; # 你的 TP 框架 index.php 所在目录, 记得用 / 分割路径 fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } } 配置完成后修改 ThinkPHP 的 URL 模式为 REWRITE, 编辑配置文件 ThinkPHP/Conf/convention.php 中修改 URL_MODEL 参数值为 2 (REWRITE 模式)便可经过 http://serverName/模块/控制器/操做 方式访问。
感谢地址 --->>> http://www.widlabs.com/article/nginx-thinkphp-url-pathinfo-rewrite