Home > Operation and Maintenance > phpstudy > How to modify port 80 in phpstudy

How to modify port 80 in phpstudy

下次还敢
Release: 2024-04-02 16:21:12
Original
1196 people have browsed it

To modify port 80 of PHPstudy, you need to edit the hosts file to add the IP address and domain name of the PHPstudy website, and then restart the Apache HTTP Server service. Verify that the change was successful by visiting http://website.example.com.

How to modify port 80 in phpstudy

How to modify port 80 of PHPstudy

Answer:

To modify port 80 of PHPstudy, you need to edit the configuration file and restart the service.

Steps:

  1. Find the configuration file:

    • Windows: C:\ Windows\System32\drivers\etc\hosts
    • macOS:/etc/hosts
  2. Edit configuration file:

    • Open the hosts file.
    • Find a line similar to the following: 127.0.0.1.
    • Add the IP address and domain name of the PHPstudy website after the line, for example: 127.0. 0.1 website.example.com
  3. ##Restart the PHPstudy service:

      Windows: Open the Control Panel and go to Go to Administrative Tools and click Services. Find the "Apache HTTP Server" service, right-click and select "Restart".
    • macOS: Open a terminal and enter the following command:
    • sudo apachectl restart
  4. Verify changes:

      Open
    • http://website.example.com in your browser. If you can see the default page of PHPstudy, the modification has been successful.

The above is the detailed content of How to modify port 80 in phpstudy. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template