Home  >  Article  >  Backend Development  >  How to set up a server in php

How to set up a server in php

王林
王林Original
2019-10-08 10:29:244799browse

How to set up a server in php

Build a Web server

1. Directory structure

How to set up a server in php

2. Access the server

访问规则:http://服务器ip地址/php页面
比如:
http://localhost/demo.phphttp://127.0.0.1/demo.php

3. Apache common commands

httpd -v   查看apache版本号   version
httpd -t   检测运行环境  test

4.Internet communication Principle

Access process:

How to set up a server in php

##Steps:

4.1. The client enters the domain name (web address) and performs DNS resolution (Domain Name Server) in the nearest computer room. DNS resolution is to convert the domain name into an IP address.

4.2. Through the IP address Accessing the server

5. DNS resolution

Object: It is inconvenient to access the server by IP address, so access it through the domain name.

The hosts file is used for DNS resolution.

Recommended tutorial:

PHP video tutorial

The above is the detailed content of How to set up a server 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