Nginx 프록시 뒤에 SSL을 사용하여 Apache + Subversion을 실행하는 데 문제가 있습니다. 누군가 답변을 얻길 기대합니다. 나는 내 문제에 대한 해답을 찾는 몇 시간 동안 구글을 샅샅이 뒤졌고 그것을 이해하지 못한 것처럼 보였다. 내가보고있는 것은 "502 (잘못된 게이트웨이)"오류입니다. 전복을 사용하여 이동하거나 복사하려고하면 오류가 발생합니다. 그러나 체크 아웃과 커밋은 잘 작동합니다.502 잘못된 게이트웨이 nginx + apache + subversion + ssl (SVN COPY)
연구하면서 내가 말할 수있는 것을에서 Nginx에
upstream subversion_hosts {
server 127.0.0.1:80;
}
server {
listen x.x.x.x:80;
server_name hostname;
access_log /srv/log/nginx/http.access_log main;
error_log /srv/log/nginx/http.error_log info;
# redirect all requests to https
rewrite ^/(.*)$ https://hostname/$1 redirect;
}
# HTTPS server
server {
listen x.x.x.x:443;
server_name hostname;
passenger_enabled on;
root /path/to/rails/root;
access_log /srv/log/nginx/ssl.access_log main;
error_log /srv/log/nginx/ssl.error_log info;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
add_header Front-End-Https on;
location /svn {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
set $fixed_destination $http_destination;
if ($http_destination ~* ^https(.*)$)
{
set $fixed_destination http$1;
}
proxy_set_header Destination $fixed_destination;
proxy_pass http://subversion_hosts;
}
}
아파치
Listen 127.0.0.1:80
<VirtualHost *:80>
# in order to support COPY and MOVE, etc - over https (443),
# ServerName _must_ be the same as the nginx servername
# http://trac.edgewall.org/wiki/TracNginxRecipe
ServerName hostname
UseCanonicalName on
<Location /svn>
DAV svn
SVNParentPath "/srv/svn"
Order deny,allow
Deny from all
Satisfy any
# Some config omitted ...
</Location>
ErrorLog /var/log/apache2/subversion_error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /var/log/apache2/subversion_access.log combined
</VirtualHost>
: 여기에 관련 부분 (내가 생각하는)의의 nginx와 아파치 설정 문제의 파일은 이 문제는 서버 이름이 apache 서버와 nginx 서버에서 일치해야합니다. 또한이 문제는 http 만 사용하도록 구성을 변경하더라도 해결되지 않는 것처럼 보입니다.
내가 시도했다 그 과거에,하지만 생각 그것은 다시 한 번 가치가 있었다. 불행히도 나를 위해, 그 트릭을하지 않았다. –
'sudo a2enmod headers'를 실행해야만했습니다. –
이 줄을 추가했지만 몇 년 동안 작동하지 않습니다. 오늘 나는이 줄을 제거하고 지금 작동한다 – marstone