|
|
1
2
这跟nginx没什么关系,你就是做不到。SSI不接受远程URI。只能指定本地文件路径。 |
|
|
2
16
你 可以 配置nginx以包含远程URL,尽管您不能在ssi指令中直接引用它们。在站点配置中,使用本地路径和指定的远程位置创建指向您想要的位置的位置。例如: server {
....
location /remote {
proxy_pass @long_haul; # or use "try_files" to provide fallback
}
location @long_haul {
proxy_pass http://porno.com;
}
....
}
在服务的HTML中,使用包含引用/远程路径的指令: <!--# include virtual="/remote/rest-of-url&and=parameters" --> 请注意,您可以自定义通过变量和regexp进一步传递的URL。例如: location ~/remote(.+) {
proxy_pass @long_haul$1?$args;
}
|
|
devops-admin · 如何将Nginx配置为转发代理服务器? 2 年前 |
|
|
ftdeveloper · Nginx ip配置问题 2 年前 |
|
|
sifat · NGINX+Cloudflare SSL证书无效 2 年前 |
|
|
Manoj · Key斗篷Nginx集成问题 2 年前 |