我将nginx设置为我的apache tomcat的反向代理.它按照我的预期正常工作.但是,当Apache Tomcat服务器关闭时,当NGINX总是返回502 Bad Gateway时,我感到很困惑.而不是返回504 Bad Gateway超时?
502 Bad Gateway:服务器充当网关或代理,并从上游服务器收到无效响应.
504网关超时 服务器充当网关或代理,但未从上游服务器收到及时响应.
user root;
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
ssl_session_cache shared:SSL:20m;
ssl_session_timeout 10m;
keepalive_timeout 65;
map $http_upgrade $connection_upgrade {
default Upgrade;
'' close;
}
server {
listen *:80;
return 301 https://$host:443$request_uri;
}
server{
listen *:443; #Ip of client
# Specifies the maximum accepted body size of a client request, as indicated by the request header Content-Length.
client_max_body_size 1024M;
# …
Run Code Online (Sandbox Code Playgroud) 我有 3 个文本文件。我想读取它们并将它们存储在不同的变量中,然后使用粘贴将它们连接起来并在控制台中打印它们。我尝试了以下代码,但它抛出了一个错误:
文件未找到
这是我的代码
#!/bin/sh
value_1=`cat file_1.txt`
value_2=`cat file_2.txt`
value_3 = paste $value_1 $value_2
echo "$value_3"
Run Code Online (Sandbox Code Playgroud)