Build a Web server
1. Directory structure
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:
##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 server5. 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: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!