WEB建设

dustfree / 2023-05-17 / 原文

Web是一种最流行的网络应用。其使用HTTP/HTTPS协议进行通信。

HTTP/HTTPS协议,即超级文本(带超级链接的文本)传输协议,定义了Web浏览器与Web服务器之间的通信规则。

HTTP/HTTPS协议有请求数据包和响应数据包两种:

  • 请求数据包_头部字段:方法 URL 版本;

                                             Accpet  Referer  Accept-Language  User-Agent

                                             Accept-Encoding  Host  Connection

  • 响应数据包_头部字段:版本 状态码 短语;

                                           Server  Data  Content-Type

                                           Transfer-Encoding  Connection  Cache-Control

响应数据包_主体格式:声明 <html> <head> </head> <body> </body> </html>

 

Web Server由OS、DB、Web中间件、源码包组成。最常见架构为LAMP、LNMP。

其中核心组件为Web中间件、源码包。

Web中间件:Apache、Tomcat、Nginx、IIS、weblogic、websphere、Jboss、Struct2等。

源码包:由一系列文件夹、文件组成。其中包含前端文件(HTML格式、CSS样式、JavaScript与后端交互)、后端文件(asp、jsp、php、python)。

 

Apache+源码(flask开发框架+自己开发的.py)

Nginx+源码(flask开发框架+自己开发的.py)

#web进行动态解析的接口规范,一般封装在Apache等中,例如CGI/FCGI/WSGI等。

https://www.w3cschool.cn/flask/

 

宝塔、phpstudy、Appsrv、

Apache HTTP Server

安装部署

systemctl stop firewalld
systemctl status firewalld
yum -y install httpd
systemctl start  httpd
systemctl status httpd
netstat -antl

配置文件详解

https://m.imooc.com/wiki/httplesson-appachehttpd

https://www.lanmper.cn/apache/c406.html

https://www.yiibai.com/apache_http/production-web-sever.html

https://www.bilibili.com/video/BV1t4411w75m?p=11    老男孩视频,仅作参考!

Apache Tomcat详解

Nginx详解

IIS详解

附录-Python -m快速搭建web (便于下载文件)

systemctl stop firewalld
systemctl status firewalld
python -m SimpleHTTPServer 9999
netstat -antl
访问http://IP:9999

 

Web Client

CLI Web Client:curl www.qq.com

GUI Web Client:Google Chrome浏览器、Firefox浏览器等。

基本用法、高级用法(插件)略

 

Firefox全历史版本下载:

http://ftp.mozilla.org/pub/mozilla.org//firefox/releases/