On Thursday, July 26, 2012 9:47:33 AM UTC+1, Jay Are Galinada wrote:
> Noong Huwebes, Hulyo 26 2012 06:22:42 UTC+8, si yarek chmielewski ay
> sumulat:
>> ok, forget about file://
>> what about http:// access ?
>> My idea is to run this chat sample on normal 80 port and not using a
>> special port.
>> Is that possible ?
Or you can put it behind nginx like:
server {
server_name now.local;
# All R-ead URI's point to 19080 instance
location / {
proxy_pass http://127.0.0.1:19080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Adding the nodejs proxy
location ~* "(/stat/1.gif|/now|/config.json)" {
proxy_pass http://127.0.0.1:29080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
So in the above case, anything pointing to /stat/1.gif|/now|/config.json is
proxied to http://127.0.0.1:29080
And anything else is proxied to a different application, in my case ikaaro
running on 19080.
> Yes, it is possible to run the your nodejs server in port 80
> as long as no other programs/services using that port, and incoming and
> outgoing 80 port is open to your system.