![pam_unix(sudo:auth):身份验证失败 - 重新启动 apache2](https://linux22.com/image/915593/pam_unix%EF%BC%88sudo%EF%BC%9Aauth%EF%BC%89%EF%BC%9A%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%E5%A4%B1%E8%B4%A5%20-%20%E9%87%8D%E6%96%B0%E5%90%AF%E5%8A%A8%20apache2.png)
我正在 Linode 上的 Linux 虚拟机(Ubuntu 19)上部署我的网站。
我的部署在允许的情况下有效:xx.xx.xx.xx:8000
为了允许 HTTP/TCP 流量,我做了:
sudo delete allow 8000
sudo allow http/tcp
当我跑步时:
sudo service apache2 restart
我得到:
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
所以如果我运行:
journalctl -xe
我得到:
Aug 28 18:52:06 django-server sudo[14724]: pam_unix(sudo:auth): authentication failure; logname=ucluser uid=1000 euid=0 tty=/dev/pts/2 ruser=ucluser rhost= user=ucluser
Aug 28 18:52:30 django-server sshd[14529]: Received disconnect from 109.175.190.135 port 50098:11: disconnected by user
Aug 28 18:52:30 django-server sshd[14529]: Disconnected from user ucluser 109.175.190.135 port 50098
Aug 28 18:56:49 django-server sshd[14705]: Received disconnect from 109.175.190.135 port 50197:11: disconnected by user
Aug 28 18:56:49 django-server sshd[14705]: Disconnected from user ucluser 109.175.190.135 port 50197
Aug 28 19:27:40 django-server sshd[17050]: Received disconnect from 109.175.190.135 port 50366:11: disconnected by user
Aug 28 19:27:40 django-server sshd[17050]: Disconnected from user ucluser 109.175.190.135 port 50366
我认为问题出在这里:
**Aug 28 18:52:06 django-server sudo[14724]: pam_unix(sudo:auth): authentication failure; logname=ucluser uid=1000 euid=0 tty=/dev/pts/2 ruser=ucluser rhost= user=ucluser**
但我不知道如何解决它
如果我运行:
apachectl stop
我得到:
apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 50 of /etc/apache2/sites-enabled/django_project.conf: Expected </Directory> but saw </VirtualHost>
Action 'stop' failed.
答案1
解决了:
在我的,django_project.conf
我忘了关闭一个</Directory>
。
从
<Directory>
Something written here
<Directory>
到:
<Directory>
Something written here
</Directory>
/
缺少结束斜线