nginx & mod_accel
Dmitrijs Drozdeckis
dimad at petits.lv
Tue Nov 27 17:54:57 MSK 2007
Добрый день,
Nginx работает фронтэндом к апачу, все отлично. Потребовалось подключить
mod_accel и ни как. Error: 504 Gateway Time-out.
Отключаю mod_accel всё работает, включаю 504 Gateway Time-out.
Помогите разобратся, я в ступоре.
httpd.conf
...
#
AccelCacheRoot "/usr/local/httpd/cache"
AccelPassCookie on
AccelClean "@ 0 hours"
AccelIgnoreNoCache On
AccelBkRcvBuffSize 64
#
AccelRequestBuffSize 32
AccelSendSize 32
AccelAddXForwardedFor On
AccelDefaultExpire 120
AccelBusyLock 30 40 60
AccelSetXRealIP on
...
<VirtualHost 172.16.16.1:8089>
DocumentRoot /www/new.domen.lv
ServerName new.domen.lv
ServerAlias d1.domen.lv
ServerAlias d2.domen.lv
AccelPass / http://172.16.16.1:8089/ [PH]
# AccelNoPass ~*\.gif$ ~*\.jpeg$ ~*\.png$ ~*\.css$ ~*\.js$
<Directory "/www/new.domen.lv">
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
ErrorLog logs/new.err
CustomLog logs/new.acc common
CustomLog logs/new.www_accel.log accellog
</VirtualHost>
...
nginx.conf
...
server {
listen 80;
server_name new.domen.lv d1.domen.lv d2.domen.lv;
access_log logs/new.acc main;
#access_log off;
# Main location
location / {
proxy_pass http://172.16.16.1:8089/;
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 15m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
# Static files location
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|swf)$ {
root /www/new.domen.lv/;
access_log off;
expires 30d;
}
location ~ /(_vti_bin|MSOffice) {
return 404;
# access_log logs/xc_access_log;
}
}
...
Спасибо.
More information about the nginx-ru
mailing list