search
HomeOperation and MaintenancephpstudyHow to create a local site by modifying the vhosts file in phpstudy

This article mainly introduces how to use phpstudy to add a local domain name site under Windows (Create a local site by directly modifying the vhosts-conf file)

phpstudy integration The required version of the package can be downloaded from the following link:

phpstudy2016 stable version download: http://www.php.cn/xiazai/gongju/89

Download the latest version of phpStudy 2018: http://www.php.cn/xiazai/gongju/845

Then in the previous article, I have introduced it to you Create the site domain name through the site domain name management menu in phpstudy.

Now we will use another simpler method to teach you how to add a new site domain name using phpstudy.

Step 1: Create a new site folder in the root directory. Here we create the phpzww folder, which contains the specific site program.

How to create a local site by modifying the vhosts file in phpstudy

Step 2: Open other menu options in phpstudy, find and open the configuration file vhosts-conf file.

How to create a local site by modifying the vhosts file in phpstudy

In the vhosts.conf file, copy and paste the code in the following box and modify it to the correct new site Domain name , and File directory path, and then click Save.

How to create a local site by modifying the vhosts file in phpstudy

Step 3: Open the hosts file again, bind the newly created domain name , here are www.phpzww.cn and phpzww.cn, then click Save.

How to create a local site by modifying the vhosts file in phpstudy

Step 4: Finally restart the phpstudy environment.

How to create a local site by modifying the vhosts file in phpstudy

Then we can access the index file by accessing the new site domain name. If the following content is displayed, it means that we have successfully created the new site domain name. How to create a local site by modifying the vhosts file in phpstudy

This article is about the method of creating a local site in phpstudy. It is simpler than the method introduced before. Of course, you can choose the appropriate method to create a local site according to your own preferences!

The above is the detailed content of How to create a local site by modifying the vhosts file in phpstudy. 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
How do I configure phpStudy to handle CORS (Cross-Origin Resource Sharing) requests?How do I configure phpStudy to handle CORS (Cross-Origin Resource Sharing) requests?Mar 17, 2025 pm 06:14 PM

Article discusses configuring phpStudy for CORS, detailing steps for Apache and PHP settings, and troubleshooting methods.

How do I use phpStudy to test cookies in PHP?How do I use phpStudy to test cookies in PHP?Mar 17, 2025 pm 06:11 PM

The article details using phpStudy for PHP cookie testing, covering setup, cookie verification, and common issues. It emphasizes practical steps and troubleshooting for effective testing.[159 characters]

How do I use phpStudy to test file uploads in PHP?How do I use phpStudy to test file uploads in PHP?Mar 17, 2025 pm 06:09 PM

Article discusses using phpStudy for PHP file uploads, addressing setup, common issues, configuration for large files, and security measures.

How do I set up a custom session handler in phpStudy?How do I set up a custom session handler in phpStudy?Mar 17, 2025 pm 06:07 PM

Article discusses setting up custom session handlers in phpStudy, including creation, registration, and configuration for performance improvement and troubleshooting.

How do I use phpStudy to test different payment gateways?How do I use phpStudy to test different payment gateways?Mar 17, 2025 pm 06:04 PM

The article explains how to use phpStudy to test different payment gateways by setting up the environment, integrating APIs, and simulating transactions. Main issue: configuring phpStudy effectively for payment gateway testing.

How do I configure phpStudy to handle HTTP authentication in a secure manner?How do I configure phpStudy to handle HTTP authentication in a secure manner?Mar 17, 2025 pm 06:02 PM

The article discusses configuring phpStudy for secure HTTP authentication, detailing steps like enabling HTTPS, setting up .htaccess and .htpasswd files, and best practices for security.Main issue: Ensuring secure HTTP authentication in phpStudy thro

How do I use phpStudy to test different database connection options?How do I use phpStudy to test different database connection options?Mar 17, 2025 pm 06:02 PM

phpStudy enables testing various database connections. Key steps include installing servers, enabling PHP extensions, and configuring scripts. Troubleshooting focuses on common errors like connection failures and extension issues.Character count: 159

How do I use phpStudy to test different PHP frameworks and libraries?How do I use phpStudy to test different PHP frameworks and libraries?Mar 17, 2025 pm 06:00 PM

The article explains using phpStudy for testing PHP frameworks and libraries, focusing on setup, configuration, and troubleshooting. Key issues include version management and resolving common errors.

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function