-1

I am new to setting up Rails with Apache and Phusion Passenger. I am using Centos 6.5 on EC2 server. I followed this tutorial to start rails on server with apache and Phusion Passenger.

All installations were successful, but when I try to hit the domain, it just keeps loading.

My httpd.conf file changes:

LoadModule passenger_module /usr/local/rvm/gems/ruby-2.2.3/gems/passenger-5.0.21/buildout/apache2/mod_passenger.so
<IfModule mod_passenger.c>
 PassengerRoot /usr/local/rvm/gems/ruby-2.2.3/gems/passenger-5.0.21
 PassengerDefaultRuby /usr/local/rvm/gems/ruby-2.2.3/wrappers/ruby
</IfModule>

RackEnv development

<VirtualHost *:80>
 ServerName app.llynkr.com
 DocumentRoot /var/www/html/llynkr/public
 <Directory /var/www/html/llynkr/public>
 AllowOverride all
 Options -MultiViews
 </Directory>
</VirtualHost>

I rechecked my public directory, its proper.

I also checked the access and error logs. But couldnt get exactly what it means:

==> /var/log/httpd/error_log <==
[ 2015-11-30 18:55:41.0150 2971/7fcbccbfe7e0 age/Ust/UstRouterMain.cpp:317 ]: Passenger UstRouter online, PID 2971
[Mon Nov 30 18:55:41 2015] [notice] Digest: generating secret for digest authentication ...
[Mon Nov 30 18:55:41 2015] [notice] Digest: done
[ 2015-11-30 18:55:41.0924 2989/7f0d17c8d7e0 age/Wat/WatchdogMain.cpp:1276 ]: Starting Passenger watchdog...
[ 2015-11-30 18:55:41.1209 2992/7f9b58a5c7e0 age/Cor/CoreMain.cpp:957 ]: Starting Passenger core...
[ 2015-11-30 18:55:41.1212 2992/7f9b58a5c7e0 age/Cor/CoreMain.cpp:234 ]: Passenger core running in multi-application mode.
[ 2015-11-30 18:55:41.1234 2992/7f9b58a5c7e0 age/Cor/CoreMain.cpp:707 ]: Passenger core online, PID 2992
[ 2015-11-30 18:55:41.1460 2997/7f5a524d87e0 age/Ust/UstRouterMain.cpp:504 ]: Starting Passenger UstRouter...
[ 2015-11-30 18:55:41.1472 2997/7f5a524d87e0 age/Ust/UstRouterMain.cpp:317 ]: Passenger UstRouter online, PID 2997
[Mon Nov 30 18:55:41 2015] [notice] Apache/2.2.15 (Unix) DAV/2 Phusion_Passenger/5.0.21 configured -- resuming normal operations

==> /var/www/html/llynkr/log/development.log <==

==> /var/www/html/llynkr/log/production.log <==

==> /var/log/httpd/error_log <==
App 3030 stdout: 
App 3052 stdout: 
App 3064 stdout: 
[ 2015-11-30 18:56:11.0450 2986/7f3e1f1e17e0 age/Wat/WatchdogMain.cpp:454 ]: Some Phusion Passenger agent processes did not exit in time, forcefully shutting down all.

Am I missing some step in configuration?

Niraj Chauhan
  • 252
  • 2
  • 13

1 Answers1

0

Ok I found the solution, so EC2 people, if you follow that tutorial then it doesnt covers about SELinux. You need to disable SELinux.

Just edit

/etc/selinux/config

And set SELINUX=disabled

Reboot instance from aws console and then check. Also sometimes it might not work just because of IPTables too, so just add following to enable port 80

#-A INPUT -j REJECT --reject-with icmp-host-prohibited
#-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A INPUT -p tcp -m tcp --dport 80 -j ACCEPT
Niraj Chauhan
  • 252
  • 2
  • 13