Hi everybody,
I have a problem accessing Egroupware behind an Nginx reverse proxy.
I want my users to access https://egroupware.our.domain
Usually, when they are at the office, they access it via http://EGW-IP/egroupware (notice the /egroupware).
So naturally, I configured the following Nginx config :
/etc/nginx/sites-enabled/egroupware
server {
set $server "**EGW-IP**";
set $port 80;
listen 80;
listen 443 ssl http2;
server_name https://egroupware.**our.domain**;
### Certificate part ###
###################
#### Logging part ####
###################
###################
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Scheme $scheme;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Real-IP $remote_addr;
proxy_pass http://**EGW-IP**/egroupware/;
add_header Strict-Transport-Security "max-age=63072000; preload" always;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $http_connection;
proxy_http_version 1.1;
}
}
But using this config, when users go to https://egroupware.our.domain, they get the following error :
Not Found
The requested URL /egroupware/egroupware/ was not found on this server.
Apache/2.2.16 (Debian) Server at egroupware.**our.domain** Port 80
I can’t seem to find how to deal with that auto rewrite done by egroupware. I also tried to change the proxy-pass to :
proxy_pass http://EGW-IP/;
But in that case, in end up on the Apache default webpage.
Does anyone has any idea on how should I setup the Nginx ?
By the way, this is a really old egroupware, that was installed by a non existing anymore company.
Egroupware Version : 1.8.001
PHP Version : 5.3.28-1
Edit: Here is a little diagram to explain the connection method :
Thanks a lot !
Julien