Web server environment and server construction

Web history:

Web server experienced 1.0 and 2.0

1.0 Static page period: There is no interaction with the user, the user can not operate, can only browse, the common file is the HTML / HTM suffix
process: When
requesting a web page, the browser sends a request to the web server-> web server Will look for the HTML file from the corresponding web server-> the server sends the HTML content to the browser-> the browser displays the file, we can see this page (the file exists statically)

2.0 Dynamic page period: The dynamic page is driven by a script. A
PHP file is a scripting language. PHP will be parsed by the server-side language interpreter, and then parsed into an HTML file. The remaining process is the same as the static one, but the final file The suffix is ​​not .html, but .php.
However, sometimes the data accessed is huge. At this time, the support of the database is required. The php script will parse the language interpreter to retrieve the data from the database, and the database returns the corresponding data. These The data is assembled into an HTML file by a language interpreter, so as to perform the above operations

The language interpreter and the web server use the "configuration file" to operate, and the script file and the database are also connected through the "configuration file"

Web server = web server + language interpreter + database these three module architectures
(operating system + web service + analytical execution environment + data service)

Currently popular architecture:

Windows server : IIS + APS(.NET)+ SQL server .NET
Linux : Apache + PHP + MySQL LAMP
UNIX/Windows : Tomcat + JSP + Qracle J2EE

Construction of WEB server:

Integrated environment: PHP study V8 version
Download path: https://www.xp.cn/download.html

Apache service:

  1. URL composition: protocol + server name + path + file
    For example: http: //localhost/1.php
  2. localhost = local host (based on local server access)
    = 127.0.0.1 = local IP = domain name (DNS server, HOSTS file, public network access)
  3. Set up the hosts:
    (1) Open the hosts: C: \ Windows \ System32 \ drivers \ etc
    HOSTS with notepad
    (2) Set the custom domain name
    Insert picture description here
  4. Create your own webpage:
    Create html static files or php dynamic files in the WWW in the root directory of phpstudy_pro

Tips:
Sometimes notepad changes cannot be saved, this time you must give notepad administrator permissions

Published 19 original articles · Like1 · Visits 379

Guess you like

Origin blog.csdn.net/weixin_45798017/article/details/105019237