I have set up the Nginx +unicorn for my rails application, it is working while using server name as localhost, but not working if I set some other name:
server {
listen 80 default;
server_name testapp www.testapp.com;
access_log /var/log/nginx/localhost.access.log;
location / {
root /home/testapp/public;
index index.html index.htm;
}
It worked after adding the namespace on the /etc/hosts file as below
“127.0.0.1 http://www.testapp.com“