location ~ ^/admin{
rewrite ...;
}
这样用 nginx -t 检测的时候不会报错.
location ~ \.php${
...
}
这样会报错: nginx: [emerg] directive "location" has no opening "{"
1. 两个"{"之前都没有加空格 .为什么一个报错.一个不报错呢
2. "{"前面到底要不要加空格?
rewrite ...;
}
这样用 nginx -t 检测的时候不会报错.
location ~ \.php${
...
}
这样会报错: nginx: [emerg] directive "location" has no opening "{"
1. 两个"{"之前都没有加空格 .为什么一个报错.一个不报错呢
2. "{"前面到底要不要加空格?