PhpStudy: how to configure multiple sites and domain names and how to solve the 403 error, phpstudy403

Source: Internet
Author: User

PhpStudy: how to configure multiple sites and domain names and how to solve the 403 error, phpstudy403

This article is not suitable for websites with multiple domain names. It is suitable for difficulties. OK. Relatively casual.

First, open the website domain name management and configure as follows. You can set both the website domain name and directory. Set another port, instead of 80. Then add the domain name and save it.

Open the configuration file vhosts and you will see that port 801 is added.

Add in the configuration file http. conf and add the new port number after 80

Then configure 127.0.0.1 www.aaa.com In the hosts file.

Now, madgg has forbidden, 403, and no access permission.

After a great deal of effort, I finally found the solution. Next I will copy the content of the solution and then attach the address of the original article.

Step 1

Add it to the hosts file under C: \ Windows \ System32 \ drivers \ etc (do not add the # sign before it, it is a comment)

Step 2 find the httpd. conf file under Apache to open it, remove the first line #

Step 3 configure the following content in the configuration file vhosts. conf of apache:

Restart Apache.

To .... The domain name has been configured .. Now there is a problem.

This page is displayed in the browser, but when you enter www.test.com/index.php, you can use the index.php program to write your own webpage .... How to break... Comment out the 18 lines in step 3 or add + (plus sign) to the two words behind options and restart Apache to directly access www.test.com !!!! In this case, you can directly access index. php without seeing any folder... Skip this step directly. If there is no problem, just access it. Open httpd. conf, comment out the 251 lines, this problem is solved (sometimes you do not need to comment out, according to your own situation) it seems that static websites need to comment, dynamic websites do not comment out

Add your own access with port such as: http://www.aaa.com: 801/

Summary

The above section describes the phpStudy configuration method for multiple sites and multiple domain names and the solution to the 403 error. I hope it will help you. If you have any questions, please leave a message, the editor will reply to you in a timely manner. Thank you very much for your support for the help House website!

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.