我在端口上的服务器上运行着3个不同的docker容器-
我想配置服务器,以便每当请求在以下路径上命中时,都应将其重定向到相关容器-
我已经完成了将/ container1重定向到localhost:5000的操作。但是,它不提供容器1中托管的任何静态文件
我的nginx.conf文件-
#user nobody;
worker_processes 1;
http {
server {
listen 80;
server_name localhost;
#charset koi8-r;
#access_log logs/host.access.log main;
location /container1/ {
proxy_pass http://127.0.0.1:5000;
}
#error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
}
关于如何为每个容器提供静态文件的任何建议?
当我在浏览器中打开localhost / container1时,当它应用于'localhost / container1 /'时,它正在'localhost /'路由上获取静态文件
对此将提供任何帮助。