Websoft9 / docker-library

Docker Compose examples of selfhosted FOSS based on official image, just run it.
https://www.websoft9.com
Other
31 stars 16 forks source link

无法运行 Python 代码,无法连接到note服务器 [TensorFlow] - Nginx #529

Closed laozhou0731 closed 7 months ago

laozhou0731 commented 7 months ago

Describe the bug image

企业微信截图_17019088195460

Bug source

chendelin1982 commented 7 months ago

Don't use Nginx prxoy, it can running

laozhou0731 commented 7 months ago

解决方案: 修改 Nginx 容器 全局配置文件 /etc/nginx/conf.d/include/proxy.conf ,添加配置项

add_header       X-Served-By $host;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto  $scheme;
proxy_set_header X-Forwarded-For    $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP          $remote_addr;
proxy_pass       $forward_scheme://$server:$port$request_uri;
# 新增配置项
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection upgrade;
chendelin1982 commented 7 months ago

solved