Ubuntu 22.04下通过systemd启动手动pip安装的uWSGI时出现Socket未找到问题求助
Ubuntu 22.04下通过systemd启动手动pip安装的uWSGI时出现Socket未找到问题求助
我在Ubuntu 22.04上尝试把手动通过pip安装的uWSGI以systemd服务的方式启动,但至今都没成功。明明服务已经在运行了,可Nginx就是连不上uWSGI的socket,报错信息如下:
2024/05/25 22:46:18 [crit] 25250#25250: *3 connect() to unix:///tmp/website.socket failed (2: No such file or directory) while connecting to upstream, client: 127.0.0.1, server: website.django, request: "GET / HTTP/1.1", upstream: "uwsgi://unix:///tmp/website.socket:", host: "website.django"
我的systemd服务配置文件uwsgi-django.service内容是这样的:
[Unit] Description=uWSGI for Django After=syslog.target [Service] ExecStart=/var/www/djangoenv/bin/uwsgi --master --emperor /etc/uwsgi/apps-enabled Restart=always User=www-data Group=www-data DynamicUser=yes KillSignal=SIGQUIT Type=notify StandardError=syslog NotifyAccess=all [Install] WantedBy=multi-user.target
另外,socket配置文件uwsgi-django.socket的内容如下:
[Unit] Description=uWSGI for Django
备注:内容来源于stack exchange,提问作者janeden
相关产品推荐
相关产品推荐

