网站链接不适用于aws,但“ pgrep -af gunicorn”显示工作人员正在运行

时间:2019-01-12 18:25:56

标签: amazon-web-services nginx flask gunicorn

我正在尝试按照此处的部署说明将Flask网站部署到AWS。

https://eecs485staff.github.io/p2-insta485-serverside/setup_aws.html

长话短说:我选择了Ubuntu 16.04 Server Free Tier,获得了30GB的存储空间,在本地安装了大量的依赖项(为了避免时间过长,不提及它们),修改了/ etc / nginx / sites -可用/默认 只需下面的代码

server {
 listen 80;
 server_name <Public DNS (IPv4)>;

 location / {
   proxy_pass http://localhost:8000;
 }
}

在/etc/nginx/nginx.conf中,取消注释“ server_names_hash_bucket_size”这一行,并将其值更改为128。

然后运行命令

$ pkill -f gunicorn
$ pgrep -af gunicorn
$ gunicorn -b localhost:8000 -w 2 -D this_app:app

$ gunicorn -b localhost:8000 -w 2 -D this_app:app

使它在本地完美运行

还有

$ pgrep -af gunicorn

表明工人运转良好

但是,AWS链接显示无法访问该站点:(

我们将不胜感激。

0 个答案:

没有答案