python - flask部署中Nginx的问题
阿神
阿神 2017-04-18 10:16:16
[Python讨论组]

Nginx 的配置:

server {
 listen 80;
 server_name 23.145.145.241(vps的ip,我随便写的);
charset    utf-8;
access_log    /var/log/nginx/mysite.access.log    main;
error_log    /var/log/nginx/mysite.error.log    warn;
location / {
    root    /var/www/mysite;
    index    index.html index.htm;
    include uwsgi_params;
    uwsgi_pass    127.0.0.1:5000;
    uwsgi_param UWSGI_PYHOME    /var/www/mysite_venv;
    uwsgi_param UWSGI_CHDIR    /var/www/mysite;
    uwsgi_param PYTHONPATH    /var/www/mystie;
    uwsgi_param UWSGI_MODULE    run;
    uwsgi_param UWSGI_CALLABLE app;
}
}

地址栏输入ip, 访问成功!

问题是:把上面的server_name换成域名,其他不变,再访问就提示“If you see this page, the nginx web server is successfully installed and working. Further configuration is required.”
域名:阿里云买的
vps:搬瓦工
这该怎么解决呀?

阿神
阿神

闭关修行中......

全部回复(1)
怪我咯

可以完整贴出配置文件么?还是你的配置就是这样?

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 举报中心 意见反馈 讲师合作 广告合作 最新更新
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送

Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号