Forum OpenACS Development: Re: Installing OACS under an existent website and DNS

Collapse
Posted by Bjoern Kiesbye on
Hello Luri,

as I understood you want to keep what ever system is running under www.mysite.com and just forward some URL's, using nginx, to a 2nd Server running and OACS installation.

To just forward /login the nginx entry for the www.mysite.com server section would be,

- cluster1 will forward to be the IP 10.0.0.8 (OACS Server)

location ~ /login {

proxy_pass http://cluster1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_read_timeout 300;

}

But this will just worward the URL http://www.mysite.com/login , I would suggest to create a subsite within the OACS installation which is mounted under the URL /my-subsite-root/, and then configure nginx to forward all requests to http://www.mysite.com/my-subsite-root/ to the server running OACS.

location ~ /my-subsite-root/* {

proxy_pass http://cluster1;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-Scheme $scheme;
proxy_set_header Host $http_host;
proxy_read_timeout 300;

}

Cheers,
Bjoern