1panel的版本是:v1.10.18-lts
根据论坛上说的,上传jar包到home文件夹,然后配置运行环境,再创建站点,看了站点的配置文件,location / {
proxy_pass http://127.0.0.1:8080;
}
但是容器里面的ip是172.18.0.3,网站打开是502,加端口就提示 无法访问此网站
截图一下你的相关配置
运行环境和网站
看一下网站日志和运行环境日志
121.207.161.136 - - [16/Oct/2024:10:26:59 +0800] “GET / HTTP/1.1” 502 556 “-” “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36” “-”
上面是网站日志
2024/10/16 10:27:56 [error] 138#138: *80 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 121.207.161.136, server: , request: “GET / HTTP/1.1”, upstream: “http://127.0.0.1:8080/”, host:
上面是网站错误日志
2024-10-16 02:14:21,017 DEBUG Returning cached instance of singleton bean ‘scheduledExecutorService’
xmhk | 2024-10-16 02:14:21,020 DEBUG Looking for resource handler mappings
xmhk | 2024-10-16 02:14:21,022 DEBUG Returning cached instance of singleton bean ‘faviconHandlerMapping’
xmhk | 2024-10-16 02:14:21,022 DEBUG Returning cached instance of singleton bean ‘resourceHandlerMapping’
xmhk | 2024-10-16 02:14:21,022 DEBUG Found resource handler mapping: URL pattern=“//favicon.ico", locations=[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], ServletContext resource [/], class path resource []], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@7f811d00]
xmhk | 2024-10-16 02:14:21,023 DEBUG Found resource handler mapping: URL pattern="/webjars/”, locations=[class path resource [META-INF/resources/webjars/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@62923ee6]
xmhk | 2024-10-16 02:14:21,023 DEBUG Found resource handler mapping: URL pattern=“/“, locations=[class path resource [META-INF/resources/], class path resource [resources/], class path resource [static/], class path resource [public/], ServletContext resource [/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@4089713]
xmhk | 2024-10-16 02:14:21,023 DEBUG Found resource handler mapping: URL pattern=”/tongQiRanQi/”, locations=[URL [file:/home/tongQiRanQi/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@f19c9d2]
xmhk | 2024-10-16 02:14:21,026 DEBUG Could not find key ‘spring.liveBeansView.mbeanDomain’ in any property source
xmhk | 2024-10-16 02:14:21,027 INFO Starting ProtocolHandler [“http-nio-80”]
xmhk | 2024-10-16 02:14:21,034 INFO Using a shared selector for servlet write/read
xmhk | 2024-10-16 02:14:21,057 INFO Tomcat started on port(s): 80 (http) with context path ‘’
xmhk | 2024-10-16 02:14:21,059 DEBUG Adding PropertySource ‘server.ports’ with highest search precedence
xmhk | 2024-10-16 02:14:21,063 INFO Started App in 9.367 seconds (JVM running for 10.768)
xmhk | 2024-10-16 02:14:21,067 DEBUG Returning cached instance of singleton bean ‘siteManagementServiceImpl’
xmhk | 2024-10-16 02:14:21,071 DEBUG Returning cached instance of singleton bean ‘customerInfoServiceImpl’
xmhk | 2024-10-16 02:14:21,079 DEBUG Creating a new SqlSession
xmhk | 2024-10-16 02:14:21,092 DEBUG SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@4d3b04af] was not registered for synchronization because synchronization is not active
xmhk | 2024-10-16 02:14:21,107 DEBUG Fetching JDBC Connection from DataSource
xmhk | 2024-10-16 02:14:21,143 DEBUG JDBC Connection [com.alibaba.druid.proxy.jdbc.ConnectionProxyImpl@43b4f5c1] will not be managed by Spring
xmhk | 2024-10-16 02:14:21,147 DEBUG ==> Preparing: select * from site_management where 1=1 ORDER BY s_sort asc
xmhk | 2024-10-16 02:14:21,175 DEBUG ==> Parameters:
上面是运行环境日志的部分
看起来没问题 你是通过域名还是 IP 地址访问的?
ip,域名未备案,目前通过ip
ip + 端口吗?端口是多少
在这边说别人会不会看到?
原来是反向代理和端口问题,如果遇到跟我一样的朋友,记得检查哈