What should I do if I can only access the Home Page After configuring a virtual host in Linux ?, Linux virtual host
What should I do if I can only access the Home Page After configuring a virtual host in Linux?
After lamp is configured today, a virtual host is added to configure http. after conf, add a VM. Test the access and find that only the domain name can access ljt.com, but not all the domain names can access ljt.com.
Httpd-vhost... conf
<VirtualHost *: 80>
DocumentRoot "/usr/local/apache/htdocs/cyds"
ServerName cyds.ljt.com
Errorlog logs/cyds.ljt.com. err
CustomLog logs/cyds.ljt.com. access common
<Directory "/usr/local/apache/htdocs/cyds">
Options FollowSymLinks
AllowOverride None
Order allow, deny
Allow from all
</Directory>
</VirtualHost>
I checked the information for half a day:
Permission missing:
Finally, we need to add the website directory access permission in the apache configuration file/opt/lampp/etc/httpd. conf.
<Directory "/opt/lampp/www/site1">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
For more information about lamp Environment Virtual Hosts, see:
Http://www.cnblogs.com/hi-bazinga/archive/2012/04/23/2466605.html
Http://www.cnblogs.com/luoine/archive/2011/03/09/1978096.html
Http://blog.csdn.net/misakaqunianxiatian/article/details/52328775