我正在尝试为我的域生成证书。我可以 ping 我的域,但仍然出错。我已将入站防火墙规则添加到我的数字海洋服务器以接受 ipv4 和 ipv6 上的端口 80。不知道出了什么问题。[注意:我的 nginx 服务器没有运行,因为我无法获得证书]
https://community.letsencrypt.org/t/invalid-response-404-nginx-docker-container/102525
我的域名是:www.1040nra.com
我运行了这个命令:sudo certbot certonly --staging --webroot -w /root/dt-app-data/ -d 1040nra.com -d www.1040nra.com
它产生了这个输出:
Obtaining a new certificate
Performing the following challenges:
http-01 challenge for 1040nra.com
http-01 challenge for www.1040nra.com
Using the webroot path /root/dt-app-data for all unmatched domains.
Waiting for verification…
Cleaning up challenges
Failed authorization procedure. 1040nra.com (http-01): urn:ietf:params:acme:error:connection :: The server could not connect to the client to verify the domain :: Fetching http://1040nra.com/.well-known/acme-challenge/22AD-KFmF62z373CPiUKzk6dlr-0s5wMOmnmrziMqd4: Connection refused, www.1040nra.com …Run Code Online (Sandbox Code Playgroud) 我试图在我的 spring 应用程序中使用 log4j2 而不是 logback,但它不断抛出错误。pom 文件看起来像
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.7.RELEASE</version>
<relativePath />
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j2</artifactId>
</dependency>
</dependencies>
Run Code Online (Sandbox Code Playgroud)
log4j2 xml 文件看起来像
<?xml version="1.0" encoding="UTF-8"?>
<Configuration monitorInterval="60">
<Properties>
<Property name="path">logs</Property>
</Properties>
<Appenders>
<Console name="Console-Appender" target="SYSTEM_OUT">
<PatternLayout>
<pattern>
[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
</pattern>>
</PatternLayout>
</Console>
<File name="App-Appender" fileName="${path}/app_log.log" >
<PatternLayout>
<pattern>
[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n
</pattern>
</PatternLayout>
</File>
<File name="SpringBoot-Appender" …Run Code Online (Sandbox Code Playgroud) 我是keycloak第一次用于生产。我在本地计算机上运行 keycloak,从未遇到过这个问题。首先,我使用 docker 来运行 keycloak 服务器。docker 镜像是从jboss/keycloak. 我已经在我的域上设置了SSL使用letsEncrypttest.com
HTTPS-REQUIRED运行 docker 映像后,当我单击管理控制台时,我最终收到错误。从HERE HERE和HERE阅读了很多相关内容后,我意识到我的域名需要 SSL,我确实这么做了。
我还传递PROXY_ADDRESS_FORWARDING=true了我的 docker 命令。我就是这样运行的。
docker run -e KEYCLOAK_USER=temp -e KEYCLOAK_PASSWORD=temp -e PROXY_ADDRESS_FORWARDING=true -p 9090:8080 jboss/keycloak
Run Code Online (Sandbox Code Playgroud)
我的 NGINX 服务器块看起来像
map $sent_http_content_type $expires {
default off;
text/html epoch; #means no cache, as it is not a static page
text/css max;
application/javascript max;
application/woff2 max;
~image/ 30d; #it is only the logo, so maybe I could …Run Code Online (Sandbox Code Playgroud) 我在 digitalOcean 中有一个前端应用程序,域名为testDO。此域具有 SSL 证书。所以所有的请求来源都来自https://testDO.com.
我有一个位于 AWS 中的后端服务器,它是通过将 war 文件部署到 beanstalk 中创建的。它有名字testAWS.us-east-2.elasticbeanstalk.com
例如,当我直接从 url 调用 API 时,http://testAWS.us-west-2.elasticbeanstalk.com/myAPI/getName它可以工作。当我从前端调用相同的 API 时,我被阻止:混合内容。这是因为它是http而不是https吗?解决方法是什么?
java http amazon-ec2 amazon-web-services amazon-elastic-beanstalk
我有一个示例应用程序,可以在没有nginx的情况下在本地正确保护其余的api.现在,当我把它放在nginx代理后面的生产中时,它不起作用.没有错误.它允许所有请求.
使用ssl的前端服务器是https://frontend.com
使用ssl的后端服务器是https://backend.com
Keycloak代理转发是正确的
前端服务器(9000上的节点服务器)< - > NGINX < - > Keycloak(在8180上运行)
nginx文件样本
upstream keycloak_server {
server localhost:8180;
}
upstream node_server {
server localhost:9000;
}
location /auth/ {
proxy_pass http://keycloak_server;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://node_server;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
Run Code Online (Sandbox Code Playgroud)
前端服务器使用Angular调用后端api.REST api调用看起来像https://backend.com/callTest
后端服务器(在tomcat上运行)< - > NGINX < - > Spring Boot(带keycloak)
nginx样本 …
这是我第一次使用 amazon s3,我想存储我在 java spring 中使用 itext 创建的 pdf 文件。
代码(托管在 ec2 实例上)创建了一个我想存储在某处的 pdf。我正在探索亚马逊 s3 是否可以保存这些文件。最后我也想找回它。这可以使用 itext 和 java spring 来完成吗?任何例子都会很棒。
我正在学习React,并遇到了一个稍微棘手的问题。从我的API调用中,我得到一个包含对象数组的响应。我想在列表中显示它。为了了解响应的外观,这是一个示例(它是JSON数组)
data = [
{0: {name: "tom"}},
{1: {name: "Pope"}},
{2: {name: "jack"}}
];
Run Code Online (Sandbox Code Playgroud)
要在我的容器中呈现此信息,请尝试如下操作:
render() {
const items = data.map((d) => <li>{d.name}</li>);
return (
<div>
<ul>
{items}
</ul>
</div>
)
}
Run Code Online (Sandbox Code Playgroud)
但这没有打印任何内容。我什至没有任何错误。我认为我解析响应的方式是错误的。
解决我的棘手问题的正确方法是什么?
java ×3
amazon-ec2 ×2
keycloak ×2
nginx ×2
spring ×2
amazon-s3 ×1
certbot ×1
http ×1
https ×1
itext ×1
javascript ×1
jboss ×1
lets-encrypt ×1
log4j ×1
log4j2 ×1
maven ×1
proxy ×1
react-redux ×1
reactjs ×1
redux ×1
spring-boot ×1
ssl ×1