用户对动态PHP网页访问过程,以及nginx解析php步骤
一、用户对动态PHP网页访问过程 用户浏览器发起对网页的访问:http://192.168.1.103/index.php 用户和nginx服务器进行三次握手进行TCP连接(忽略包括nginx访问控制策略、nginx防火墙等访问控制策略) 第一步:用户将http请求发送给nginx服务器 第二步:nginx会根据用户访问的URI和后缀对请求进行判断 1.例如用户访问的index.php,nginx则会根据配置文件中的location进行匹配,例如: root@json:/data/web# cat /etc/nginx/conf.d/blog.conf server { root /data/web/blog/; index index.html index.htm; server_name www.fwait.com; location / { try_files $uri $uri/ /index.html; } location /blog/ { #alias /usr/share/doc/; auth_basic "authorized users only"; auth_basic_user_file /etc/nginx/passwd.conf; #autoindex on; allow 192.168.1.103; deny all; } location ~ \