全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 943|回复: 6
打印 上一主题 下一主题

[Windows VPS] 请教一个 NGINX 的问题

[复制链接]
跳转到指定楼层
1#
发表于 2013-8-15 12:06:25 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
怎么配置 无扩展名文件 解析 成 PHP

比如  siri.xx.cn/1   = siri.xx.cn/1.php

server
        {
                listen       8888;
                server_name siri.xx.cn;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/auth;

                location ~ .*\.(php|php5)?$
                        {
                                try_files $uri =404;
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;

                        }

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

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

                access_log off;

                ssl on;
                ssl_certificate  /usr/local/nginx/conf/server.crt;
                ssl_certificate_key  /usr/local/nginx/conf/server_nopwd.key;
        }

2#
发表于 2013-8-15 12:07:42 来自手机 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
3#
发表于 2013-8-15 12:10:01 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
4#
 楼主| 发表于 2013-8-15 13:14:14 | 只看该作者
解析漏洞。但是这个站点就放一个 php 文件没有上传功能
5#
 楼主| 发表于 2013-8-15 18:22:06 | 只看该作者
没有人会啊
6#
发表于 2013-8-15 22:48:09 | 只看该作者
rewrite .............................................................够长
7#
发表于 2013-8-15 23:13:04 | 只看该作者
做成文件夹  文件夹里放个index.xxx
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-12 20:44 , Processed in 0.067461 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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