【发布时间】:2012-09-14 03:08:40
【问题描述】:
我正在使用 rstudio 在 EC2 上运行远程服务器,并希望按照文档 here using nginx 中的说明设置反向代理
当我启动或重新启动 nginx 时,我收到如下所示的错误消息。显然,80 端口上没有运行其他任何东西。我没有安装 apache 或任何其他网络服务器。
ubuntu@ip-10-4-xxx-xxx:~$ sudo fuser -k 80/tcp ; sudo /etc/init.d/nginx restart
Restarting nginx: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)
nginx: [emerg] still could not bind()
nginx.
我添加到ngnix.conf的模块是推荐的sn-p:
http {
server {
listen 80;
location / {
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/;
}
}
}
我确实尝试使用 8080 而不是 80,并且 ngnix 可以正常启动,但无法连接到 rstudio。 rstudio 同时在 8787 上可用。感觉我在这里错过了一些非常简单的东西。请帮忙!!
【问题讨论】: