Linode’s server, I added a VirtualHost
DocumentRoot /home/baidu.com/public_html
Visit the website, prompt content:
Forbidden
You don't have permission to access / on this server.
The owner of the directory /home/baidu.com/public_html ll:
[root@localhost baidu.com]# pwd
/home/baidu.com
[root@localhost baidu.com]# ll
total 12
drwxr-xr-x 2 root root 4096 Oct 16 22:23 backup
drwxr-xr-x 2 root root 4096 Oct 16 22:32 logs
drwxr-xr-x 2 root root 4096 Oct 16 22:54 public_html
The default directory /var/www/html, which can be accessed by accessing the URL, directory information:
[root@localhost www]# pwd
/var/www
[root@localhost www]# ll
total 8
drwxr-xr-x 2 root root 4096 Jul 23 22:48 cgi-bin
drwxr-xr-x 2 root root 4096 Oct 16 22:14 html
After adding chmod o x to the directory /home/35dalu.com, it can be accessed.
But it is not the directory in the vhost.conf configuration. Accessing http://ln.35dalu.com/index.php (/home/35dalu.com/public_html/index.php) prompts 404 Not Find
/etc/httpd/conf.d/vhost.conf content (written by myself)
<VirtualHost ln.35dalu.com>
DocumentRoot /home/35dalu.com/public_html
ServerName 35dalu.com
ServerAlias dev.35dalu.com info.35dalu.com ln.35dalu.com
ErrorLog /home/35dalu.com/logs/error.log
CustomLog /home/35dalu.com/logs/access.log common
</VirtualHost>
伊谢尔伦2017-05-03 00:49:08
Check /home/baidu.com
和 /home
whether there is x permission for other.