Apache configures virtual directories, virtual hosts. A series of problems with the default directory!
Recently self-taught PHP, encountered a few tangled problems, illuminance Niang method also did not solve, helpless to help you Daniel
(1) installed Apache has a default site path, with 127.0.0.1 can directly access, now I configure a virtual directory, but still can not parse the directory of PHP files, delete the default site path is OK, is not configured virtual directory or virtual host must delete the default site path? Will that affect the performance of Apache for PHP support?
(2) Default site path, virtual directory, virtual host what is the difference between these three?
(3) There is also a problem, the configuration of Apache,php,mysql, installed a CMS, the installation process is not prompt error, after the end of the visit to the homepage is a bunch of garbled (exactly the code and some path), but also to see the site's pictures, the following code also and the site content overlap, what is the matter? No function code to open?
------Solution--------------------
Reference: Installation of Wamp and construction of the environment
------Solution--------------------
To your Apache/conf/extra directory http-vhosts.conf Configure the virtual host
such as this.
Enter c:/windows/system32/drivers/etc/hosts
127.0.0.1 admin.ename.com
The virtual host is configured.
------Solution--------------------
What is the key to your web hosting is the domain name, or *? If it is *, then the overall priority should be given.
------Solution--------------------
If you set up only one web directory,
Listen 80
DocumentRoot Set "C:\myweb" (your Web specific path, if it is Linux, then similar to/home/myweb) can
If you are setting up another virtual directory, you can refer to the following:
Listen 80
Listen 8081
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.