回答
收藏
分享
举报
求助,配置https访问php
提问于2022-11-21 09:36

浏览 1.8k

求助下,后台是php应用,https访问,利用nginx做了反向代理,登录页面正常显示,登录成功页面也过了(认证没问题),后续在跳转时又回来了登录页面,看了session信息,发现phpsessionid这个信息在请求头里没有,

已修改于2023-02-16 23:43



写下您的回答
发表回答
全部回答(0)

按点赞数排序

按时间排序

提问者
N不好玩
这家伙很懒还未留下介绍~
0
文章
2
问答
0
粉丝
相关问答

你好环山绕水,抱歉昨天直播时没看清你的问题,现在明白了,你可以对子目录做精确匹配后,用403拒绝:

比如下面这样就可以:

server{

    server_name www.xxx.com;

    root /home/data;

    location /news {

        return 403;

    }

}

这样,所有news子目录下的文件都会拒绝。当location比较复杂的时候,你必须考虑匹配的优先级,因为url前缀匹配优先级较低,如果有正则表达式能够命中2.html的话,你还要调整相应的正则location,如果有这种情况,你可以参考下这篇文章:https://www.nginx-cn.net/article/69

点赞 0
浏览 4.1k

低版本,编译会打印md5和sha1。我测试1.10版本,是打印md5和sha1的,1.11以上不打印了,可以查看
https://github.com/nginx/nginx/tree/master源代码代码仓库auto/summary文件,里面有描述。下面为我本地Ubuntu18.04编译指令:
在代码根目录运行,./auto/configure --prefix=/opt/nginx --with-http_stub_status_module --with-http_ssl_module --with-stream --with-stream_ssl_module --add-module=/home/lq/work/tongmingzhiyun/openresty/lua-nginx-module-0.10.21 --add-module=/home/lq/work/tongmingzhiyun/openresty/ngx_devel_kit-0.3.1
Configuration summary
+ using system PCRE library
+ using system OpenSSL library
+ md5: using OpenSSL library
+ sha1: using OpenSSL library
+ using system zlib library

nginx path prefix: "/opt/nginx"
nginx binary file: "/opt/nginx/sbin/nginx"
nginx modules path: "/opt/nginx/modules"
nginx configuration prefix: "/opt/nginx/conf"
nginx configuration file: "/opt/nginx/conf/nginx.conf"
nginx pid file: "/opt/nginx/logs/nginx.pid"
nginx error log file: "/opt/nginx/logs/error.log"
nginx http access log file: "/opt/nginx/logs/access.log"
nginx http client request body temporary files: "client_body_temp"
nginx http proxy temporary files: "proxy_temp"
nginx http fastcgi temporary files: "fastcgi_temp"
nginx http uwsgi temporary files: "uwsgi_temp"
nginx http scgi temporary files: "scgi_temp"

点赞 0
浏览 3.8k

我自己测试的话,发现在udp情况下,如果nginx.conf设置了proxy_timeout 1s,也就是udp会话维持1s或者不维持,则可以断下来,考虑到可能是nginx自带的会话维持导致这种结果

点赞 0
浏览 3.5k