Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Nginx + Apache + Subversion
Максим, спасибо.
On 03/09/11 14:44, Maxim Dounin wrote:
А вот тут в качестве "..." что? Потому что если там есть хоть
один regexp location - то с высокой вероятностью часть запросов в
subversion просто не попадёт.
Простейший workaround - вместо
location /svn {
написать
location ^~ /svn {
Но лучше изжить regexp location'ы и/или спрятать внутри обычных
location'ов.
Нет такого. Вот полный конфиг:
user nginx nginx;
worker_processes 4;
error_log /var/log/nginx/error.log info;
events {
worker_connections 1024;
use epoll;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main
'$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" '
'"$gzip_ratio"';
client_header_timeout 10m;
client_body_timeout 10m;
send_timeout 10m;
client_max_body_size 10m;
gzip on;
gzip_min_length 1100;
gzip_buffers 16 8k;
gzip_types text/plain;
sendfile on;
tcp_nopush on;
keepalive_timeout 75 20;
passenger_root /usr/libexec/passenger;
passenger_ruby /usr/bin/ruby;
server {
listen 443 default ssl;
server_name localhost;
ssl on;
ssl_certificate /etc/ssl/private/1.pem;
ssl_certificate_key /etc/ssl/private/1.pem;
passenger_enabled on;
passenger_base_uri /redmine;
access_log /var/log/nginx/default-ssl_access.log main;
error_log /var/log/nginx/default-ssl_error.log info;
root /home/www/default-ssl/htdocs;
location /munin {
auth_basic "Restricted area";
auth_basic_user_file
/home/www/default-ssl/data/passwd;
}
location /svn {
proxy_pass http://localhost:8880;
set $fixed_destination $http_destination;
if ( $http_destination ~* ^https(.*)$ ) {
set $fixed_destination http$1;
}
proxy_set_header Destination $fixed_destination;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For
$proxy_add_x_forwarded_for;
}
include /etc/nginx/fastcgi_main.conf;
}
Maxim Dounin
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru
|