这是我的服务器配置:
server {
listen 0.0.0.0;
server_name dev.host.com;
location / {
include /etc/nginx/proxy.conf;
proxy_pass http://127.0.0.1:5000;
proxy_redirect default;
error_page 502 =200 @maintenance;
}
location ^~ /(img|js|css)/ {
root /path/to/application/assets;
expires max;
break;
error_page 404 =302 /;
}
location @maintenance {
root /path/to/static/offline/files;
try_files $uri $uri/ /index.html =503;
}
}
Run Code Online (Sandbox Code Playgroud)
当上游应用程序不在线时,我将获得根路径的默认 nginx 502 页面(即 : GET /)。知道为什么会这样吗?我希望根路径像任何其他请求路径一样响应维护页面。
我有一个同时运行 aweb和workerDeployment的 Rails 服务器。一个启动 Puma,另一个启动 Sidekiq。如何rails console使用在 Kubernetes 集群上运行的应用程序映像连接到交互式?