gpt4 book ai didi

nginx - 如何配置 nginx 与 Jetty6 网络服务器一起工作?

转载 作者:行者123 更新时间:2023-12-03 21:28:02 26 4
gpt4 key购买 nike

nginx 似乎与 php、ruby 和 python 一起使用。

任何人都有如何设置 nginx 以在后端与 jetty/tomcat 一起使用的示例?

谢谢。

最佳答案

对。我想我有资格成为自学者,不是吗。

只需在 nginx.conf 文件的 http { } 范围内添加这些行:

server {
listen 80;
server_name mydomain.com www.mydomain.com;
access_log /var/log/nginx_67_log main;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}

我现在必须尝试 gzip、SSL 和 dojo Cometd,看看我是否可以升级到 nginx。
欢迎提供任何线索。

关于nginx - 如何配置 nginx 与 Jetty6 网络服务器一起工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/266931/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com