I am setting up my VPS with Ubuntu 20.04 installed, that I am using to host my personal website.
I am editing /etc/apache2/apache2.conf to allow Apache to access my website directory (according to this answer), by adding:
<Directory /path/to/website/directory/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
After this edit, Apache won't restart and I get the following error message when executing service apache2 reload:
Job for apache2.service failed.
See "systemctl status apache2.service" and "journalctl -xe" for details.
journalctl -xe indicates:
Mar 29 07:54:18 vps-b3576e37 sudo[41093]: pam_unix(sudo:auth): Couldn't open /etc/securetty: No such file or directory
I have tried adding a /etc/securetty file with the contents given in this verified answer, and I have tried copying the example file cp /usr/share/doc/util-linux/examples/securetty /etc/securetty, but the error remains.
If I remove my website's directory in /etc/apache2/apache2.conf, Apache is able to restart.
I did not have this issue on my previous Ubuntu 18.04 VPS.
Is there something wrong with the /etc/securetty file which I created? Or is there a better fix?