Ruby on Rails
Tuesday, May 31, 2011
Sent from my iPhone
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 webmaster@myapp.com
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
</Directory>
RailsEnv production
PassengerMaxPoolSize 25
LogLevel warn
ErrorLog /var/log/apache2/rails/error.log
CustomLog /var/log/apache2/rails/access.log combined
</VirtualHost>
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
<IfModule mod_ssl.c>
# If you add NameVirtualHost *:443 here, you will also have to change
# the VirtualHost statement in /etc/apache2/sites-available/default-ssl
# to <VirtualHost *:443>
# Server Name Indication for SSL named virtual hosts is currently not
# supported by MSIE on Windows XP.
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
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 .
That domain is not registered/does not exist. You would need to purchase the domain and point it at your server. If you are running this in dev on you local machine you can just edit the host file.
B.
Regards,
Loganathan.s
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment