nginx 变量例子

$1 你前面正则圆括号匹配的内容
$host 示例 www.xxx.com 就是主机
$request_filename 示例 /var/www/path/to/index.php 物理路径和文件,不含链接参数
$fastcgi_script_name 示例 /path/to/index.php 物理相对路径和文件,不含链接参数
$uri 示例 /path/to/index.php 链接相对路径和文件,不含链接参数
$args 示例 id=1&typ=1 链接参数,前面没有问号
$document_root 示例 /var/www/html 你声明的root物理根路径
上注:通常root声明根路径,尾巴不要斜杆,而alias虚拟目录尾巴最好要加斜杆)

rewrite 中 permanent last break 的区别 容后说
nginx 中 try_files rewrite return 的区别 容后说
nginx 中 alias root 的区别 容后说

点赞

发表评论

电子邮件地址不会被公开。必填项已用 * 标注