Home >Backend Development >PHP Problem >How to set up a virtual domain name in php

How to set up a virtual domain name in php

coldplay.xixi
coldplay.xixiOriginal
2020-11-02 14:18:062621browse

How to set a virtual domain name in php: first find the apache configuration file [httpd.conf] and remove the comments; then configure the virtual domain name in [..httpd-vhosts.conf] and redirect; then find the hosts file Add relevant statements; finally restart the apache server.

How to set up a virtual domain name in php

How to set a virtual domain name in php:

1. Find the apache configuration file httpd.conf

How to set up a virtual domain name in php

2. In D:\wamp\bin\apache\Apache2.2.21\conf\extra\httpd-vhosts.conf

How to set up a virtual domain name in php

3. Redirect, otherwise a 403 error will occur when accessing other projects

How to set up a virtual domain name in php

4. Find C:\Windows\System32\drivers\etc\hosts

How to set up a virtual domain name in php

5. In the last step, don’t forget to restart the apache server!

In this way, the virtual domain name you configured can be accessed, and other projects can be accessed using "127.0.0.1" or "localhost"!

Related video recommendations: PHP programming from entry to proficiency

The above is the detailed content of How to set up a virtual domain name in php. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more