autodataming的个人博客分享 http://blog.sciencenet.cn/u/autodataming

博文

aws

已有 1759 次阅读 2017-10-29 11:30 |系统分类:科研笔记

允许web使用不同端口



AWS默认的security groups是不会开ICMP的 所以就算网络和instance运行都正常得情况下都是无法ping通的 
可以在instance 的 security gourps中inbound添加一条规则
custom ICMP Rule Echo Reply Anywhere



sudo vi /var/log/nginx/error.log

https://stackoverflow.com/questions/25995060/nginx-cannot-connect-to-jenkins-on-centos-7

2014/09/22 22:12:35 [crit] 1639#0: *4 connect() to 127.0.0.1:8080 failed (13: Permission denied) while connecting to upstream, client: 10.10.81.212, server: 10.10.81.82, request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:8080/", host: "10.10.81.82"

Does anyone has any idea what causes the problem?

P.S. I used the similar setup on CentOS 6.4 and everything was fine.


It seemed to be a SELinux related problem. As suggested in this question I have tried using

setsebool -P httpd_can_network_connect 1

and everything works fine after that.

--------------aws_pur_nginx.conf---

注意事项是proxy_pass http://127.0.0.1:1000; 转到内网

web app 中的host是http://0.0.0.0:1000/

server {
   listen 80;
   server_name purpleai.chenzhaoqiang.com;
   #charset koi8-r;
   access_log /var/log/nginx/purpleai.access.log;
   location / {
       proxy_pass http://127.0.0.1:1000;
      # proxy_pass http://52.77.218.136:1000;
   }

}



https://blog.sciencenet.cn/blog-950202-1082867.html

上一篇:windows批量安装字体
下一篇:window中如何安装spyder?
收藏 IP: 45.77.35.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-6-26 01:26

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部