Rackspace's network setup means that public IPs are not visible locally. This means that if I happen to use a domain name that resolves to the same machine as he box, it requires manually adding to /etc/hosts. Usually as localhost.
Not wanting to duplicate myself, I was hoping to setup a particular service under a different port and proxying from the public IP to the localhost. But I am missing something?
[code]
server {
listen 216.239.159.104:8081;
server_name appsever.domain.com;
root /var/www/appserver;
access_log /var/log/nginx/apps-public-access.log;
error_log /var/log/nginx/apps-public-error.log;
index index.html;
location / {
proxy_pass http://127.0.0.1:8081;
}
}
server {
listen 127.0.0.1:8081;
server_name appsever.domain.com;
root /var/www/appserver;
access_log /var/log/nginx/apps-local-access.log;
error_log /var/log/nginx/apps-local-error.log;
index index.html;
}
[/code]