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

How to modify port 80 in phpstudy

下次还敢
下次还敢 Original
2024-04-02 16:21:12 915browse

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.comin 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!

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