我当前正在使用的Web应用程序在提交发帖请求(发送电子邮件的联系表)时遇到一些问题,
它在我的本地计算机上可以正常工作,但是当我在实时服务器上提交它时,它给我一个504错误,
我将Nginx作为Web服务器运行,是因为Nginx无法与smtp.gmail或其他连接吗?
最重要的是如何解决此问题?
这是我的Nginx配置
server { server_name woke-agency.com;
location = /favicon.ico { access_log off; log_not_found off; }
location /static {
alias /home/ubaid/woke/static_root;
}
location /media {
alias /home/ubaid/woke/media_root;
}
location / {
include uwsgi_params;
uwsgi_pass unix:/var/uwsgi/woke.sock;
}
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/woke-agency.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/woke-agency.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
server {
if ($host = woke-agency.com) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name woke-agency.com;
listen 80;
return 404; # managed by Certbot
}