location = /api/servertime {
.^~
, то регулярки не проверяются. location ^~ /api/servertime {
access_log off;
rewrite ^ /index.php break;
include fastcgi.conf;
fastcgi_pass php;
}
<VirtualHost *:80>
DBDriver mysql
DBDParams "dbname=test user=root pass=xxxxxx"
RewriteMap user2id "dbd:select id from users where name = %s "
RewriteEngine On
RewriteRule ^/user2id/([^/]+) http://domain.com/id/${user2id:$1} [R,L]
location /app {
root /home/back/project/randomname;
index index.html;
}
location /app {
root /home/back/project/randomname/app/;
location /app {
root /home/back/project/randomname;
RewriteEngine On
RewriteCond %{THE_REQUEST} /subdomains/
RewriteRule ^([^/]+)/(.*) http://$1.site.ru/$2 [R=301,L]
server {
listen 180.250.210.33:80 default;
server_name _;
#access_log /var/log/nginx/180.250.210.33.log main;
location / {
proxy_pass http://180.250.210.33:8080;
}
location ~ \.(zip|txt|sql)$ { return 404; }
}
nginx.org/ru/docs/http/ngx_http_core_module.html#l...
А в
$request_uri
первоначальный URI запросаnginx.org/ru/docs/http/ngx_http_core_module.html#v...