I have been trying to serve Scriptcase running on port 8091 through Nginx as a reverse proxy. I think I misunderstand what should proxy_pass
do because everything I did so far is not working.
The closest I got to my goal is a crippled Scriptcase app login page. Here are the settings:
...
location /scd {
proxy_redirect off;
proxy_set_header Host $host;
proxy_pass http://127.0.0.1:8091/scriptcase/devel/iface/login.php;
}
...
As far as I know, after logging in, if the page presented was not crippled, the PHP file accessed will be index.php
. But all I get is the crippled login page which I can not use to perform the login procedure.
What I understand and expect is that proxy_pass
would just delegate the requests. So if I want to access the Scriptcase application I would reach for it through https://myserver.com/scd
and I will not see any changes in the URL in the address bar.
Also on the crippled page, I am presented with, I see: You have reached your license connections limit, please choose which session you want to disconnect to log in.
EDIT:
I have managed to serve the app on the root with /scd
,not as intended but acceptable. All I had to do is the following:
location /scd {
rewrite /scd(.*) /$1 break;
proxy_pass http://127.0.0.1:8091;
proxy_redirect ~^(/.*) https://myserver.com/scd$1;
}
One problem arose from this setup. Now I can't use location ~ .php$
to process PHP files in the regular root directory for other applications.