首页 > nginx 转发配置问题

nginx 转发配置问题

需求: 本地监听了几个端口,挂载了不同的服务,想禁止外面访问,只通过转发形式让外面的人访问。

状况: 使用url:port/wiki 形式访问服务一切正常,说明服务配置没错,问题出在转发配置

问题: 无法登录。输入正确用户名和密码之后,访问/wiki 还显示未登录,我觉得是proxysetheader 设置错了。

转发配置:

location /wiki { 
    proxy_set_header Accept-Encoding "";
    subs_filter_types text/html text/css text/xml;

    subs_filter /dokuwiki/doku.php /wiki/doku.php;
    subs_filter /dokuwiki/lib /wiki/lib;
    subs_filter "http://localhost:8080" "";
    subs_filter "href=\"/dokuwiki/\"" "href=\"/wiki/\"";

    proxy_pass        http://localhost:8080/dokuwiki;
    proxy_redirect    http://localhost:8080/dokuwiki http://url.aa/wiki;

    proxy_set_header        X-Real-IP       $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

}

求教

【热门文章】
【热门文章】