Application not accesible

I have installed nginx + passenger on my VPS with Centos 5.4. I have installed my application and my nginx config is as follows.

http {     passenger_root /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.8;     passenger_ruby /usr/local/bin/ruby;

    include mime.types;     default_type application/octet-stream;     sendfile on;     keepalive_timeout 65;     server {   listen 80;         server_name 115.112.187.132;         root /root/projectfedena-projectfedena_v2.0-a213125/public;         passenger_enabled on;

        location / {             root html;             index index.html index.htm;         }

  error_page 500 502 503 504 /50x.html;         location = /50x.html {             root html;         } }

But when I access the ip address (haven't assigned an URL as yet) I only see the apache2 test page instead of the application landing page. My log file shows the following entries

[Wed Aug 24 12:27:52 2011] [error] [client 122.164.136.38] Directory index forbidden by Options directive: /var/www/html/ [Wed Aug 24 13:03:28 2011] [error] [client 122.164.136.38] Directory index forbidden by Options directive: /var/www/html/ [Wed Aug 24 14:40:30 2011] [error] [client 122.164.136.38] Directory index forbidden by Options directive: /var/www/html/

I am not sure why Nginx is still accessing /var/www/html when I have mentioned the root directory.

Wonder what could be wrong. Any help would be appreciated

But when I access the ip address (haven't assigned an URL as yet) I only see the apache2 test page instead of the application landing page. My log file shows the following entries

[Wed Aug 24 12:27:52 2011] [error] [client 122.164.136.38] Directory index forbidden by Options directive: /var/www/html/ [Wed Aug 24 13:03:28 2011] [error] [client 122.164.136.38] Directory index forbidden by Options directive: /var/www/html/ [Wed Aug 24 14:40:30 2011] [error] [client 122.164.136.38] Directory index forbidden by Options directive: /var/www/html/

I am not sure why Nginx is still accessing /var/www/html when I have mentioned the root directory.

Are your requests definitely getting through to nginx rather than apache ?

Fred

Frederick Cheung wrote in post #1018216:

I am not sure why Nginx is still accessing /var/www/html when I have mentioned the root directory.

Are your requests definitely getting through to nginx rather than apache ?

Fred

Is there a sure shot way of finding out. A ps -A returned the following :slight_smile: 6975 ? 00:00:00 httpd 6977 ? 00:00:00 httpd 6978 ? 00:00:00 httpd 6979 ? 00:00:00 httpd 6980 ? 00:00:00 httpd 6981 ? 00:00:00 httpd 6982 ? 00:00:00 httpd 6983 ? 00:00:00 httpd 6984 ? 00:00:00 httpd

I guess these are nginx processes because apache processes usually run as "apache2" and not as "httpd". I am attaching a screenshot of the page displayed when I visit the url. Thanks in advance for helping out.

Attachments: http://www.ruby-forum.com/attachment/6547/115.112.187.132_screen_capture_2011-8-25-11-25-47.png

Frederick Cheung wrote in post #1018216:

I am not sure why Nginx is still accessing /var/www/html when I have

mentioned the root directory.

Are your requests definitely getting through to nginx rather than

apache ?

Fred

Is there a sure shot way of finding out. A ps -A returned the following

:slight_smile:

6975 ? 00:00:00 httpd

6977 ? 00:00:00 httpd

6978 ? 00:00:00 httpd

6979 ? 00:00:00 httpd

6980 ? 00:00:00 httpd

6981 ? 00:00:00 httpd

6982 ? 00:00:00 httpd

6983 ? 00:00:00 httpd

6984 ? 00:00:00 httpd

I guess these are nginx processes because apache processes usually run

as “apache2” and not as “httpd”. I am attaching a screenshot of the page

displayed when I visit the url. Thanks in advance for helping out.

Apache processes usually run as httpd and not apache2. The executable that gets started when one starts Apache can be found here:

<PARENT_DIRECTORY>/apache2/bin/httpd

-Conrad

Conrad Taylor wrote in post #1018381:

Apache processes usually run as httpd and not apache2. The executable that gets started when one starts Apache can be found here:

<PARENT_DIRECTORY>/apache2/bin/httpd

-Conrad

Attachments:

Oh, I come from an Ubuntu background. Let me check the etc/rc5.d directory.

I stopped httpd and started nginx. Now I see the page

Welcome to nginx!

But not the application home page. Not sure what is wrong. Any help would be appreciated.

Thanks for helping.