标签(空格分隔): linux


nginx配置文件:

server
{
listen 81;
#listen [::]:80;
server_name _;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/thinkphp5.0.5/public; include rewrite/other.conf;
#error_page 404 /404.html; # Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; } include enable-php-pathinfo.conf; # --start--- TP5加上这一块 支持pathinfo
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
} location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
try_files $fastcgi_script_name =404;
set $path_info $fastcgi_path_info;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass unix:/dev/shm/php-cgi.sock;
fastcgi_index index.php;
include fastcgi.conf;
}
# --end--- TP5加上这一块 支持pathinfo location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ /.well-known {
allow all;
} location ~ /\.
{
deny all;
} access_log /home/wwwlogs/thinkphp5.0.5.log;
}

Nginx下部署TP5项目的更多相关文章

  1. Nginx下部署Laravel项目

    Nginx下部署Laravel项目 标签(空格分隔): php Nginx配置文件 listen 80 default_server; #listen [::]:80 default_server i ...

  2. Linux下部署tp5项目如何隐藏URL中index.php

    找到nginx配置文件,加入以下代码: location / { if (!-e $request_filename){ rewrite ^/(.*)$ /index.php?s=/$1 last; ...

  3. 在nginx上部署vue项目(history模式);

    在nginx上部署vue项目(history模式): vue-router 默认是hash模式,使用url的hash来模拟一个完整的url,当url改变的时候,页面不会重新加载.但是如果我们不想has ...

  4. Linux 下部署Django项目

    Linux 下部署Django项目   说明:本文所使用的环境为CentOS 6+Python2.7+Django1.11 安装Django.Nginx和uWSGI 1.确定已经安装了2.7版本的Py ...

  5. 在nginx上部署vue项目(history模式)--demo实列;

    在很早之前,我写了一篇 关于 在nginx上部署vue项目(history模式) 但是讲的都是理论,所以今天做个demo来实战下.有必要让大家更好的理解,我发现搜索这类似的问题还是挺多的,因此在写一篇 ...

  6. 在IIS下部署Thinkphp项目,验证码不能显示的解决办法

    由于公司租用的是虚拟空间,而且用的是IIS服务器,所以部署PHP的时候就出现很多问题:比如昨天就碰到这个问题:在IIS下部署Thinkphp项目,验证码不能显示 这是生成验证码的方法: // 制作专门 ...

  7. Tomcat—怎样在Tomcat Webserver下部署Web项目

            总结一下怎样在Tomcat Webserver下部署Web项目:

  8. linux下部署php项目-Apache、php、mysql关联

    linux下部署php项目环境可以分为两种,一种使用Apache,php,mysql的压缩包安装,一种用yum命令进行安装. 使用三种软件的压缩包进行安装,需要手动配置三者之间的关系.apache和p ...

  9. tpadmin的坑收集 nginx下配置tp5失败

    如下: 1.ADMIN模块如要关联查询,model的函数名一定不要有“_”下划线,否则找不到 /common/model/**.php 如果把函数名file写成“**_file”,调用时,$vo.** ...

随机推荐

  1. Oracle Table Function

    Oracle Table Function在Oracle9i时引入.完美的兼容了view和存储过程的长处: 应用举例: 1.Table()函数: set feedback off create or ...

  2. JavaScript-4.4函数递归之阶乘举例---ShinePans

    <html> <head> <meta http-equiv="content-type" content="text/html;chars ...

  3. easyui编辑器(kindeditor-4.1.10)

    //1  重写kindedit    -建一个js文件 easyui_kindeditor.js (function ($, K) {     if (!K)         throw " ...

  4. Educational Codeforces Round 6 A. Professor GukiZ's Robot 水

    A. Professor GukiZ's Robot   Professor GukiZ makes a new robot. The robot are in the point with coor ...

  5. jni javah

    如何通过javah生成jni头文件 1.javah的使用说明:   -classpath 给出包含native接口的java类的.class文件路径 -d / –o 指定生成的头文件的,-d只给出文件 ...

  6. 8.boost_array_any

    #include <iostream> #include <string> #include <boost/array.hpp> //异构的容器 #include ...

  7. POJ 3657 并查集

    题意: 思路: 1.二分+线段树(但是会TLE 本地测没有任何问题,但是POJ上就是会挂--) 2.二分+并查集 我搞了一下午+一晚上才搞出来----..(多半时间是在查错) 首先 如果我们想知道这头 ...

  8. android adb command

    一.adb启动activity: $ adb shell$ am start -n {包(package)名}/{包名}.{活动(activity)名称} 如:启动浏览器 # am start -n ...

  9. X86 X64 X86_64 AMD64 区别

    X86:32位(一般i386是32位CPU的统称) X64:64位(代表CPU:IA64,现在几乎没有这样纯粹的64位CPU,都是兼容32位的64位CPU,如下) X86_64:兼容32位的64位CP ...

  10. HDU 1166 敌兵布阵【线段树 单点更新】

    题意:给出n个数,a1,a2,a3,,,,,an,再给出一些操作 add i  j 表示给第i个节点增加j sub i  j 表示给第i个节点减少j query i j 表示询问第i个节点到第j个节点 ...