Hi All,
I want to run my application with domain name rather than local host
,so i
followed the below steps,but i’m having unable to connect error ,can any
one
help me on this.
gem install passenger
passenger-install-apache2-module
*My rails app location:
/var/www/rails
cd /etc/apache2/sites-available
touch m-lo-lo.com(my virtualhost file)
<VirtualHost 127.0.0.1:8081>
#ServerAdmin [email protected]
ServerName m-lo-lo.com
DocumentRoot “/root/var/www/rails/public/”
<Directory “/root/var/www/rails/public/”>
Options FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
RailsEnv production
PassengerMaxPoolSize 25
LogLevel warn
ErrorLog /var/log/apache2/rails/error.log
CustomLog /var/log/apache2/rails/access.log combined
To create symbolic link for virtual host file in “sites-enabled”
directory
ln -s /etc/apche2/sites-available/m-lo-lo.com
/etc/apche2/sites-enabled/
m-lo-lo.com
sudo vi /etc/hosts file
#192.168.21.129 ubuntu # Added by NetworkManager
#127.0.0.1 localhost.localdomain localhost
127.0.0.1 m-lo-lo.com p233
::1 ubuntu localhost6.localdomain6 localhost6
127.0.1.1 ubuntu
The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
vi port.conf
Listen 8081
I created a file "passenger.load "in mod-available directory:
LoadModule passenger_module
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.7/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.7
PassengerRuby /usr/bin/ruby1.8
a2ensite m-lo-lo.com
Site m-lo-lo.com enabled
/etc/init.d/apache2 reload
/etc/init.d/apache2 restart
mkdir /var/log/apache2/rails/
touch access.log
touch error.log
cd /var/www/rails
touch tmp/restart.txt
hit my browser with
http://m-lo-lo.com
didnt have anything .*
Regards,
Loganathan.s