lnmp.org 问题集

一、删除隐藏文件 .user.ini

        1、查看ls -a  

        2、lsattr .user.ini 

        3、chattr -i .user.ini

        4、rm -f .user.ini

二、配置nginx www.site.com.conf

server
    {
        listen 80;
        #listen [::]:80;
        server_name www.site.com site.com;
        index index.html index.htm index.php default.html default.htm default.php;
        root  /data/www/www.site.com/public;

        include thinkphp.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.conf;
        location ~ [^/]\.php(/|$)
        {
            #try_files $uri =404;
            fastcgi_pass  unix:/tmp/php-cgi.sock;
            fastcgi_index index.php;
            include fastcgi.conf;
            include pathinfo.conf;
        }

        location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
        {
            expires      30d;
        }

        location ~ .*\.(js|css)?$
        {
            expires      12h;
        }

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log  /home/wwwlogs/www.site.com.log;
    }


三、修改php.ini

        1、cgi.fix_pathinfo=1

        2、删除disable_functions 里的 scandir

四、错误

      1、OSError: Command /root/.local/share/letsencrypt/bin/python2.7 - setuptools pkg_resources pip wheel failed with error code 2

     解决办法:
     卸载virtualenv
        pip uninstall virtualenv
    安装virtualenv
        pip install virtualenv

    2、 cat ~/.pip/pip.conf

         [global]
         index-url = https://pypi.doubanio.com/simple/
         [install]
         trusted-host=pypi.doubanio.com

转载于:https://my.oschina.net/u/3545218/blog/1798842

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值