zoukankan      html  css  js  c++  java
  • 那些在linux上遇到的坑 +1

    这几天一直在弄服务器

    我把自己的项目拉倒linux上的时候出现了各种permission denied 500 403 的错误 

    这些错误都可以设置权限来解决,可是遇到了一个我打死也没有想到会错的问题 404。

    前思后想  在windows 上一点问题都没有,为什么到linux 上就会出现404的错误呢,既然

    在windows上没有错误 那说明代码肯定是没有问题的,有问题的只是重写配置。于是乎开始

    了一场跟重写打仗的日子。

    找了好久 总算是找到了  原来我卸载项目路径下的.htaccess 或者 nginx.htaccess 文件没有生效,

    我索性就把里面的重写规则放到了server配置里面。 bingo  问题完美解决

    下面是我的server配置   yii2.0

    server {
        listen 80;  #监听端口
        root /home/luo/www/720kfang/backend/web; #项目根目录
        # Add index.php to the list if you are using PHP
        index index.php; 
    
        server_name backend.720kfang.com; #域名
    
        location / {
              # Redirect everything that isn't a real file to index.php
              try_files $uri $uri/ /index.php?$args; #yii2.0的重写
        }
        
        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ .php$ {
            include snippets/fastcgi-php.conf;
        #
        #    # With php7.0-cgi alone:
        #    fastcgi_pass 127.0.0.1:9000;
        #    # With php7.0-fpm:
            fastcgi_pass unix:/run/php/php7.0-fpm.sock;
        }
    }
  • 相关阅读:
    nasm astrstr函数 x86
    nasm astrspn函数 x86
    nasm astrset_s函数 x86
    nasm astrrev函数 x86
    模板:最长公共子序列(LCS)
    模板:最小生成树(MST)
    模板:并查集
    模板:单源最短路径
    模板:最近公共祖先(LCA)
    模板:线段树(1)——加法,求和
  • 原文地址:https://www.cnblogs.com/eddief/p/7009308.html
Copyright © 2011-2022 走看看