0
我正在與rstudio EC2遠程服務器nginx的啓動,並尋求建立一個反向代理nginx的使用無法在ubuntu12.04(精確)與rstudio
當我開始文檔here中所示或者重新啓動nginx我會得到如下所示的錯誤信息。顯然,沒有其他任何東西在端口80上運行。我沒有安裝Apache或任何其他Web服務器。
[email protected]:~$ 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模塊是推薦的片段:
http {
server {
listen 80;
location/{
proxy_pass http://localhost:8787;
proxy_redirect http://localhost:8787/ $scheme://$host/;
}
}
}
我曾嘗試用8080的代替80和ngnix開始罰款,但沒有連接到rstudio。 rstudio同時在8787上可用。感覺就像我在這裏錯過了一些非常簡單的事情。請幫助!!
我認爲你這樣做是錯誤的 - 我認爲你添加的配置應該在'sites-enabled'子目錄中的文件中。 –
@DirkEddelbuettel你是對的。應該在啓用的網站文件夾中。更新我的答案。 – Generalenthu