Site URL not completed. Bad redirection ?

gerard breiner nginx-forum at
Mon Oct 29 13:57:54 UTC 2012


I'm trying to replace apache2 by nginx. So far my platform debian squeeze +
Apache2 + sogo 2.0.2 works very fine.
However I decided to replace apache2 by nginx 1.2.4-1.
It works too but it seems there is a redirection that doesn't work. My url :
https://sogo.mydomain give a page error 403 forbidden. I have to complete
the url with /SOGo so that I get the login.
Here is the error.log of nginx :
directory index of "/usr/lib/GNUstep/SOGo/WebServerResources/" is forbidden,
client:, server: sogo.mydomain, request: "GET / HTTP/1.1",
host: "sogo.mydomain"

Here is my sogo.conf :

server {
listen 443;
root /usr/lib/GNUstep/SOGo/WebServerResources/;
ssl on;
ssl_certificate /etc/nginx/ssl.fac/;
ssl_certificate_key /etc/nginx/ssl.fac/;

location ^~/SOGo {
proxy_redirect default;
# forward user's IP address
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header x-webobjects-server-protocol HTTP/1.0;
proxy_set_header x-webobjects-remote-host;
proxy_set_header x-webobjects-server-name $server_name;
#proxy_set_header x-webobjects-server-url;
proxy_set_header x-webobjects-server-url $scheme://$host;
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;
client_max_body_size 50m;
client_body_buffer_size 128k;

location /SOGo.woa/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
allow all;

location /SOGo/WebServerResources/ {
alias /usr/lib/GNUstep/SOGo/WebServerResources/;
allow all;

location ^/SOGo/so/ControlPanel/Products/([^/]*)/Resources/(.*)$ {
alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;

alias /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2;


I would be very pleased to get some advices.

Best regards.

Gerard Breiner

Posted at Nginx Forum:,232325,232325#msg-232325

More information about the nginx mailing list