What should I do if I can only access the Home Page After configuring a virtual host in Linux ?, Linux virtual host

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.