使用 django + nginx + uwsgi 部署一個網站
買了一個網域測試
但只在同個區域網路可以連線
用手機網路連就沒辦法連上
請問是哪邊的設定要調整嗎?
附上我的nginx設定
# savemoney_nginx.conf
# the upstream component nginx needs to connect to
upstream django {
server unix:///home/savemoneyenv2/savemoney/savemoney.sock; # for a file socket
#server 127.0.0.1:8001; # for a web port socket (we'll use this first)
}
# configuration of the server
server {
# the port your site will be served on
listen 80;
# the domain name it will serve for
server_name savemoney.live; # substitute your machine's IP address or FQDN
charset utf-8;
# max upload size
client_max_body_size 705M; # adjust to taste
# Django media
location /media {
alias /home/savemoneyenv2/savemoney/media; # your Django project's media files - amend as required
}
location /static {
alias /home/savemoneyenv2/savemoney/static; # your Django project's static files - amend as required
}
# Finally, send all non-media requests to the Django server.
location / {
uwsgi_pass django;
include /home/savemoneyenv2/savemoney/uwsgi_params; # the uwsgi_params file you installed
}
}