<VirtualHost *:80>
RewriteRule ^(.*)$ http://citymoms.ru [R=301,L]
</VirtualHost>
upstream local {
server 127.0.0.1:81;
}
server {
listen 80;
server_name www.trololo.com;
location / {
proxy_pass http://local;
}
}
location ~ \.(jpg|png|gif) {
root /var/www/trololo.com;
}
log_format useragent '$remote_addr - [$time_local] "$host" "$request" $status ($bytes_sent) "$http_referer" '
'[$request_time] gzip:"$gzip_ratio" cache:"$upstream_cache_status" "$content_length" '
'agent:"$http_user_agent" "upstream: $upstream_addr time:$upstream_response_time sec.";
80.60.50.12 - [02/Dec/2015:16:45:34 +0300] "trololo.com" "GET /Feed/Games?lng=ru HTTP/1.1" 200 (5343) "https://trololo.com/games/" [0.019] gzip:"-" cache:"EXPIRED" "-" agent:"Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0" "upstream: 127.0.0.1:80 time:0.018 sec."
GET /Feed/Games?lng=ru HTTP/1.1
был отправлен на апстрим, находящийся на адресе 127.0.0.1:80 и апстрим ответил за 0.018 секунд. А сам nginx отработал запрос за 0.019 секунд (значение в квадратных скобках).80.60.50.12 - [02/Dec/2015:16:52:21 +0300] "trololo.com" "GET /img/76.png HTTP/1.1" 200 (1870) "https://trololo.com/" [0.000] gzip:"-" cache:"-" "-" agent:"Mozilla/5.0 (Windows NT 6.1; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0" "upstream: - time:- sec." "UA=-"