找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 9|回复: 1

关于nginx跪求各位大佬指点下

[复制链接]

15

主题

256

回帖

563

积分

高级会员

积分
563
发表于 2017-6-25 12:08:54 | 显示全部楼层 |阅读模式
github地址:https://github.com/arakasi72/rtinst
安装了rt一键包,为啥其它目录不能执行PHP文件,因为我想安装个芒果云方便文件管理,求大佬指点一下
贴上default配置文件,因为被我修改过原文件配置没了
server {
        listen 80;
        root /var/www;
         index index.html index.php index.htm;
        location /rutorrent {
               auth_basic "Restricted";
               auth_basic_user_file /etc/nginx/.htpasswd;
               include /etc/nginx/conf.d/php;
               include /etc/nginx/conf.d/cache;
        }
         location /kod {
                include /etc/nginx/conf.d/php;
}
#include /etc/nginx/sites-available/dload-loc;
}

conf.d/php
location ~ \.php$ {
          fastcgi_split_path_info ^(.+\.php)(/.+)$;
          fastcgi_pass unix:/var/run/php5-fpm.sock;
          fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
          fastcgi_index index.php;
          include fastcgi_params;
}
回复

使用道具 举报

2

主题

116

回帖

252

积分

中级会员

积分
252
发表于 2017-7-5 08:28:44 | 显示全部楼层
目录不能执行php应该是如下类似的配置
        location ~* /wp-content/uploads/.*\.php$ {
                 deny all;
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Discuz! X

GMT+8, 2025-2-12 12:10 , Processed in 0.015452 second(s), 4 queries , Gzip On, Redis On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表