Home  >  Article  >  Operation and Maintenance  >  How to quickly build a website with phpstudy so that others can access it

How to quickly build a website with phpstudy so that others can access it

下次还敢
下次还敢Original
2024-04-02 14:06:19638browse

Making the website accessible to the outside world through PHP Study requires the following steps: configure port mapping and change the server port to an externally accessible port. Add a firewall rule making sure "php-cgi.exe" is selected under both "Private" and "Public" networks. Get the public IP. Inform visitors of the public IP, server port, and website subdirectory (if any).

How to quickly build a website with phpstudy so that others can access it

Achieving external access to the website through PHP Study

How to let others access the website built through PHP Study ?

Step 1: Configure port mapping

  • Open PHP Study, click the "Tools" menu > "Configuration" > "Port Mapping" .
  • Change the "Server Port" to an externally accessible port, such as 8080.
  • Change the "Local Server" port to the default port of PHP Study, such as 80.

Step 2: Add firewall rules

  • Open Windows Defender Firewall and click "Allow an app or feature through Windows Defender Firewall".
  • Click the "Change Settings" button.
  • In the "Allowed apps and features" list, find "php-cgi.exe" and make sure it is selected under both "Private" and "Public" networks.

Step 3: Get the public IP

  • Visit whatismyipaddress.com in your browser to get your public IP address.

Step 4: Inform others of your public IP address

  • Indicate your public IP address, server port and subdirectory of your website ( If so) inform visitors. For example, if your website is at "http://localhost/mywebsite", tell it as "http://[your public IP]:[server port]/mywebsite".

How do visitors get to your website?

Visitors can use the URL you provide to access your website in the browser, such as:

<code>http://[你的公网IP]:[服务器端口]/mywebsite</code>

Note:

  • Make sure the server port is consistent with the port specified in the firewall rule.
  • If your router has a firewall, you will also need to enable the server port in it.
  • If your Internet Service Provider (ISP) blocks server ports, you will need to contact them for assistance.

The above is the detailed content of How to quickly build a website with phpstudy so that others can access it. 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