关于lnmp下 phalcon和tp框架下的nginx文件配置
vim /etc/nginx/sites-available/default 进入修改目录
1.正常项目配置
server {
listen 80 default_server;
listen [::]:80 default_server;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
root /var/www/php;
# Add index.php to the list if you are using PHP
index index.html index.htm index.nginx-debian.html index.php;
#server_name www.wudi.com; #网站的域名
location / {
try_files $uri $uri/ =404;
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 10000;
}
}
2.tp框架配置
server {
listen 8081;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
root /var/www/tp5/public;
# Add index.php to the list if you are using PHP
index index.html index.htm index.php;
#server_name www.wudi.com; #网站的域名
location / {
#try_files $uri $uri/ =404;
if (!-e $request_filename){
rewrite ^/(.*)$ /index.php?s=/$1 last;
}
}
# pass PHP scripts to FastCGI server
location ~ \.php$ {
include fastcgi_params;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
# fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 10000;
}
}
3.phalcon框架下配置
server {
listen 8082;
# server_name
root /var/www/daifang/public;
index index.php index.html index.htm;
charset utf-8;
location / {
try_files $uri $uri/ /index.php?_url=$uri&$args;
}
location ~ \.php {
fastcgi_index /index.php;
include fastcgi_params;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# location ~ /\.ht {
# deny all;
# }
}
关于lnmp下 phalcon和tp框架下的nginx文件配置的更多相关文章
- tp框架下,数据库和编辑器都是utf-8, 输出中文却还是乱码
输出: array(2) { [0]=> array(4) { ["id"]=> string(1) "1" ["user"]= ...
- 6月19 使用tp框架生成验证码及文件上传
ThinkPHP中自带能生成验证码的类:ThinkPHP/Library/Think/Verify.class.php 默认情况下,验证码的字体是随机使用 ThinkPHP/Library/Think ...
- PHP.TP框架下商品项目的优化1-时间插件、鼠标所在行高亮、布局规划页面
1.优化搜索表单中按时间搜索的功能 添加一个时间插件datetimepicker,在lst.html中,注意要导入jquery.min.js,此处从前文的在线编辑器中导入 <!-- 导入 --& ...
- 第一零五天上课 PHP TP框架下分页
控制器代码(TestController.class.php) <?php namespace Home\Controller; use Home\Controller\EmptyControl ...
- 第一零三天上课 PHP TP框架下控制器的方法分离
(1)配置信息 修改配置文件->Config.php (配置后,原先的控制方法无效) 'ACTION_BIND_CLASS' => TRUE, // 控制器方法分离 (2)在Control ...
- PHP.TP框架下商品项目的优化3-php封装下拉框函数
php封装下拉框函数 因为在项目中会经常使用到下拉框,所以根据一个表中的数据制作下拉框函数,以便调用 //使用一个表的数据做下拉框函数 function buildSelect($tableName, ...
- 第一零四天上课 PHP TP框架下的文件上传
控制器代码(TestController.class.php) <?php namespace Home\Controller; use Home\Controller\EmptyControl ...
- PHP.TP框架下商品项目的优化4-优化商品添加表单js
优化商品添加表单js 思路 1.制作五个按钮 2.下面五个table 3.全部隐藏,点击则显示 4.点击第几个按钮就显示第几个table 具体操作 1.添加按钮 2.添加五个table并添加class ...
- PHP.TP框架下商品项目的优化2-图片优化
图片存储.上传.显示优化 1.图片路径写进配置文件,当路径有变动时[因业务扩大,服务器存储图片空间不足等],只需修改配置文件,而不用修改代码 2.封装显示.上传.删除函数,实现代码重用 [可类比其他类 ...
随机推荐
- MySQL操作(备份很重要)
文档一: --修改用户密码的命令 mysqladmin -uroot -proot123 password mysql123 --登录mysql数据库的命令 mysql -uroot -proot12 ...
- MacOS10.14下Eclipse安装lombok
按照网上的教程来做,会导致eclipse启动不了,这里记录一下解决方案: 一.复制lombok.jar到../Eclipse/下 二.修改eclipse.ini,在末尾追加: -Xbootclassp ...
- 哈尔滨工业大学(威海)第九届ACM程序设计竞赛 Virtual Youtuber
链接 [https://ac.nowcoder.com/acm/contest/624/G] 题意 其实题意说的辣鸡死了,没有说明确. y is the subsequences that its s ...
- php将字符串转为二进制数据串
/** * 将字符串转换成二进制 * @param type $str * @return type */ function StrToBin($str){ //1.列出每个字符 $arr = pre ...
- 自然人税收管理系统扣缴客户端Sqlite数据库有密码的,如何破解读取呢
https://www.cnblogs.com/Charltsing/p/EPPortal.html 有人问我能不能直接读自然人税收管理系统扣缴客户端,因为需要导出数据做处理. 看了一下,这个客户端是 ...
- Unity TimeLine 资源结构
---恢复内容开始--- 先看一个TimeLine,如图 再来看看在Inspector中的PlayableDirector 其他参数字面意思很清楚了不再赘述,着重讲一下一个TimeLine绑定的资源. ...
- python工程师成长之路精品课程(全套)
python工程师成长之路精品课程(全套) 有需要联系我:QQ:1844912514 什么是Python? Python是一门面向对象的编程语言,它相对于其他语言,更加易学.易读,非常适合快速开发. ...
- easyui判断下拉列表
{field:'state',title:'状态',width:100, formatter : function(value, row, index){ if (value == 0) { retu ...
- kafka依赖zookeeper原因解析及应用场景
kafka简介: kafka是一个发布订阅消息系统,由topic区分消息种类,每个topic中可以有多个partition,每个kafka集群有一个多个broker服务器组成,producer可以发布 ...
- web services + soap + wsdl 学习
什么是web services? 应用程序组件: 使用开放协议进行通信: 独立(self - contained )并可自我描述: 可通过使用UDDI来发现: 可被其他应用程序使用: XML是Web ...