On Jan 19, 3:58 pm, Donovan <[email protected]> wrote:
> Currently the app-servers.include hard codes the port 80 in the
> configuration. I need to support proxying several other apps to the
> backend but on different ports, whats the best way to accomplish this
> and still use the scaling features?
>
> examples:
>
> subscriber.example.com:80 proxies to backend:80
> signup.example.com:80 proxies to backend:4040
> status.example.com:80 proxies to backend:6464

I solved the issue by taking the /usr/local/aws/lib/nginxlib.sh and
copying it to /usr/local/aws/user/lib/nginx_reload

removed several parts and functions that I didn't need.

Parameterized the APP_PORT setting

<pre>
       APP_PORT=$1
        NGINX_INCL="/etc/nginx/app-servers.$APP_PORT.include"
        touch $NGINX_INCL
</pre>

then at the bottom I call

<pre>
nginx_upstream_reload 40000
nginx_upstream_reload 30000
</pre>

for as many ports as I need to add.

in nginx.conf I add

<pre>
        include /etc/nginx/app-servers.30000.include;
        include /etc/nginx/app-servers.40000.include;
</pre>

I'm still testing. Hope this helps someone else.




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"scalr-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/scalr-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to