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:搬瓦工
这该怎么解决呀?
Copyright 2014-2026 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
可以完整贴出配置文件么?还是你的配置就是这样?