I am trying to setup nginx to be reverse proxy for wildfly 8.0.0.Final.
Part of my configuration file for HTTPS redirect:
location /console {
include conf.d/proxy.conf;
proxy_pass http://127.0.0.1:9990/console;
proxy_redirect http://127.0.0.1:9990/console https://X.Y.W.Z/console;
}
... similar location for...
/management
/logout
/error
...
location / {
include conf.d/proxy.conf;
proxy_pass http://127.0.0.1:8080/;
}
proxy.conf:
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
add_header Front-End-Https on;
Problem is - when I login to /console I get error message:
Access Denied: Insufficient privileges to access this interface.
I don't even have idea what is causing this. Any help is appreciated!
Marko, maybe too late, but I was able to get nginx and wildfly working following your configuration, let me share that:
In proxy_headers.conf:
In my app.conf
Before I did this I faced the same error as you so using developer tools in Chrome I figured out that ajax requests to /management and the others paths are done so I took care of them.
Try to add this in server config:
Perhaps a little late, but this info may help.
I has the same issue with a front-end Nginx proxy (without SSL) and WildFly 8.2.0.Final in Docker. Same error when trying to access the Administration Console through Nginx.
Discovered that WildFly expects the Host header in the form of HOST:PORT (by comparing headers from packets captured through tcpdump and analysed in Wireshark).
Here's my configuration, should it help anyone:
Hope this helps.