Пытаюсь настроить
dklab realplexor
Этот пункт:
Проксировать обращения к Realplexor-у через nginx (если у вас нет nginx, выбирайте п. 1):
server {
server_name rpl.YourSite.com;
listen rpl.YourSite.com:80;
location / {
proxy_pass http://127.0.0.1:8088;
}
}
/etc/nginx/vhosts/MYDOMAIN/dev.MYDOMAIN.com.conf
#user 'MYDOMAIN' virtual host 'dev.MYDOMAIN.com' configuration file
server {
server_name dev.MYDOMAIN.com www.dev.MYDOMAIN.com;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /var/www/MYDOMAIN/data/www/dev.MYDOMAIN.com;
ssi on;
access_log /var/www/httpd-logs/dev.MYDOMAIN.com.access.log ;
error_log /var/www/httpd-logs/dev.MYDOMAIN.com.error.log notice;
listen dev.MYDOMAIN.com:80;
include /etc/nginx/vhosts-includes/*.conf;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:8088;
proxy_redirect http://127.0.0.1:8088 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off ;
}
}
При переходе по адресу dev.MYDOMAIN.com, происходит ошибка: 504 Gateway Time-out. Почему так?
Исходной конфиг /etc/nginx/vhosts/MYDOMAIN/dev.MYDOMAIN.com.conf:
#user 'MYDOMAIN' virtual host 'dev.MYDOMAIN.com' configuration file
server {
server_name dev.MYDOMAIN.com www.dev.MYDOMAIN.com;
charset off;
disable_symlinks if_not_owner from=$root_path;
index index.html index.php;
root $root_path;
set $root_path /var/www/MYDOMAIN/data/www/dev.MYDOMAIN.com;
ssi on;
access_log /var/www/httpd-logs/dev.MYDOMAIN.com.access.log ;
error_log /var/www/httpd-logs/dev.MYDOMAIN.com.error.log notice;
listen IP_ADDRESS:80;
include /etc/nginx/vhosts-includes/*.conf;
location / {
location ~ [^/]\.ph(p\d*|tml)$ {
try_files /does_not_exists @fallback;
}
location ~* ^.+\.(jpg|jpeg|gif|png|svg|js|css|mp3|ogg|mpe?g|avi|zip|gz|bz2?|rar|swf)$ {
try_files $uri $uri/ @fallback;
}
location / {
try_files /does_not_exists @fallback;
}
}
location @fallback {
error_log /dev/null crit;
proxy_pass http://127.0.0.1:8080;
proxy_redirect http://127.0.0.1:8080 /;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
access_log off ;
}
}
/etc/dklab_realplexor.conf
$CONFIG{WAIT_ADDR} = [ '127.0.0.1:8088' ]; # your IP address and port
$CONFIG{IN_ADDR} = [ '127.0.0.1:10010' ]; # for IN line
/var/log/messages
May 16 19:14:48 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:14:48 2015] WAIT: 127.0.0.1:42387: DEBUG: [1431792828.85733000600000:domain_Alpha] connection closed
May 16 19:14:48 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]
May 16 19:14:49 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:14:49 2015] WAIT: 127.0.0.1:46225: DEBUG: connection opened
May 16 19:14:49 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]
May 16 19:14:49 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:14:49 2015] WAIT: 127.0.0.1:46225: DEBUG: read 544 bytes
May 16 19:14:49 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]
May 16 19:14:49 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:14:49 2015] WAIT: 127.0.0.1:46225: DEBUG: [1431792889.23384000800000:domain_Alpha] registered
May 16 19:14:49 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=1 data_to_send=0 connected_fhs=1 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:41 2015] WAIT: 127.0.0.1:49078: DEBUG: connection opened
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=1 data_to_send=0 connected_fhs=1 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:41 2015] WAIT: 127.0.0.1:49078: DEBUG: read 437 bytes
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=1 data_to_send=0 connected_fhs=1 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:41 2015] WAIT: 127.0.0.1:46225: DEBUG: [1431792889.23384000800000:domain_Alpha] connection closed
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:41 2015] WAIT: 127.0.0.1:49110: DEBUG: connection opened
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:41 2015] WAIT: 127.0.0.1:49110: DEBUG: read 544 bytes
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:41 2015] WAIT: 127.0.0.1:49110: DEBUG: [1431792941.33419000900000:domain_Alpha] registered
May 16 19:15:41 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=1 data_to_send=0 connected_fhs=1 online_timers=1 cleanup_timers=0 events=1]
May 16 19:15:46 domain realplexor/dklab_realplexor.conf: [Sat May 16 19:15:46 2015] WAIT: 127.0.0.1:49110: DEBUG: [1431792941.33419000900000:domain_Alpha] connection closed
May 16 19:15:46 domain realplexor/dklab_realplexor.conf: [pairs_by_fhs=0 data_to_send=0 connected_fhs=0 online_timers=1 cleanup_timers=0 events=1]