# Cant set up root for nginx

**URL:** <https://www.ruby-forum.com/t/cant-set-up-root-for-nginx/224819>\
**Category:** Deployment\
**Created:** [November 27, 2012, 1:23pm UTC](https://www.ruby-forum.com/t/cant-set-up-root-for-nginx/224819 "2012-11-27T13:23:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [November 27, 2012, 1:23pm UTC](https://www.ruby-forum.com/t/cant-set-up-root-for-nginx/224819/1 "2012-11-27T13:23:58Z")

</div>

Hi,

i am in deep problem to deploy my tiny ruby on rails app in ubuntu with  
nginx. i have installed nginx. when i browse localhost, its welcoming  
me. but while i am trying to browse my blog like localhost/blog , its  
showing 404Not found. i have configured nginx.conf file as below

#user nobody;  
worker\_processes 1;

error\_log logs/error.log;  
#error\_log logs/error.log notice;  
#error\_log logs/error.log info;

pid logs/nginx.pid;

events {  
worker\_connections 1024;  
}

http {  
passenger\_root  
/usr/local/rvm/gems/ruby-1.9.2-p320/gems/passenger-3.0.18;  
passenger\_ruby /usr/local/rvm/wrappers/ruby-1.9.2-p320/ruby;

include mime.types;  
default\_type application/octet-stream;  
server {  
listen 80;  
server\_name localhost  
root /home/sbrc/sukanta/blog/public;  
passenger\_enabled on;  
}  
}

Please help me out. i will wait for your response. i have spent 2 days  
already to find a solution but nothing is working.please help me. thank  
you
