Home > Article > Operation and Maintenance > Steps to configure multi-site and multiple domain names in phpStudy
First, open the site domain name management. The configuration is as follows. You can set the website domain name and directory yourself. Reset the port to one other than 80. Then add it first and then save it.
Open the configuration file vhosts, and you will see the addition of port 801
In the configuration file http. conf, add a new port number after 80
and then configure it in the hosts file, 127.0.0.1 www.aaa.com
Then again, Mader GG, forbidden appears, 403, no access rights.
After a lot of effort, I finally found the solution. I will copy the content of the solution first, and finally attach the address of the original article.
First step
Add under the hosts file under C:\Windows\System32\drivers\etc (do not add the # sign in front, it is a comment)
The second step
Find the httpd.conf file under Apache and open it, remove the
in front of line 171#The third step
In the apache configuration file vhosts.conf, configure the following content
Just restart Apache. . . . The domain name is assigned. .
There is another problem at this time
The browser displays a page like this
But when you enter www.test.com/index .php, you can access the index.php program
You need to write the full path. . . . How to break. . .
Comment out the 18 lines in the third step or add (plus sign) in front of the two words after options and then restart Apache to directly access www.test.com
This The problem is solved! ! ! !
There is another problem at this time
You can’t see the folders in index.php directly. . . I skipped it directly, so what?
No problem, just go and visit.
Open httpd.conf at this time, comment out line 251, and the problem will be solved (sometimes you don’t need to comment out, it depends on your own situation)
It seems to be a static website Annotations are required, but not for dynamic websites.
Add another sentence and bring the port when accessing, such as: http://www.aaa.com:801/
Okay, happy programming
Recommended tutorial: phpStudy quick entry video tutorial
The above is the detailed content of Steps to configure multi-site and multiple domain names in phpStudy. For more information, please follow other related articles on the PHP Chinese website!