April 23, 2014 06:48PM
http://nginx.org/ru/docs/http/ngx_http_core_module.html#root

"В значении параметра путь можно использовать переменные, кроме $document_root и $realpath_root."

http://nginx.org/ru/docs/http/ngx_http_core_module.html#server_name

"Регулярное выражение может содержать выделения (0.7.40), которые могут затем использоваться в других директивах:

server {
server_name ~^(www\.)?(.+)$;

location / {
root /sites/$2;
}
}

server {
server_name _;

location / {
root /sites/default;
}
}"

Обратите внимание на http://nginx.org/ru/docs/http/server_names.html#regex_names
Subject Author Posted

Dynamically configured mass virtual hosting

Лапочкин Константин April 09, 2014 07:38AM

Re: Dynamically configured mass virtual hosting

iprok April 23, 2014 06:48PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 189
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready