zoukankan      html  css  js  c++  java
  • nginx conf 文件

    server
        {
            listen 80;
            server_name local.light.com;
            index index.html index.htm index.php;
            root  /home/wwwroot/default/******/Public;      // !!!! 所在的文件需要有可执行权限, 一般是755 的权限,否则会报403 找不到文件 的错误
    
            #error_page   404   /404.html;
            include enable-php-pathinfo.conf;
    
            location /nginx_status
            {
                stub_status on;
                access_log   off;
            }
    
            location ~ .*.(gif|jpg|jpeg|png|bmp|swf)$
            {
                expires      30d;
            }
    
            location ~ .*.(js|css)?$
            {
                expires      12h;
            }
    
            location ~ /.
            {
                deny all;
            }
    
            access_log  /home/wwwlogs/access_****.log;
        }



            include enable-php-pathinfo.conf;  这里很重要  有时候引入enable-php.conf 文件
         如果这里注释掉,将解析不了php文件,就会出现访问php文件,直接下载了php文件的发生!
     
  • 相关阅读:
    OWIN启动项的检测
    Katana概述
    update-database时出现Cannot attach the file
    数据并行
    SpinLock(自旋锁)
    屏障
    同步操作
    T4文本模板
    托管线程中的取消
    监视器
  • 原文地址:https://www.cnblogs.com/pansidong/p/11124486.html
Copyright © 2011-2022 走看看