Hi I am a newbie (which you probably guessed from the subject) and have just installed ruby 1.8.7, rails 2.3.5 and apache 2.2.12 on ubuntu 9.10. I have created a rails app and edited my apache config as shown below. The Rails "Welcome aboard" page displays, but when I click on "About your application''s environment" I get "Not Found The requested URL /public/rails/info/properties was not found on this server. Apache/2.2.12 (Ubuntu) Server at localhost Port 80" Can anybody tell me what I have done wrong? Thanks in advance ------------------------------------------------------------------------- Apache config at /etc/apache2/sites-available/default <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /home/henry/Projects/Project1 <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /home/henry/Projects/Project1/> Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny allow from all AddHandler cgi-script .cgi </Directory> ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin"> AllowOverride None Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Order allow,deny Allow from all </Directory> ErrorLog /var/log/apache2/error.log # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/apache2/access.log combined Alias /doc/ "/usr/share/doc/" <Directory "/usr/share/doc/"> Options Indexes MultiViews FollowSymLinks AllowOverride None Order deny,allow Deny from all Allow from 127.0.0.0/255.0.0.0 ::1/128 </Directory> </VirtualHost> -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Welcome to Rails. :) It all seems overwhelming at first, but it is quite easy to learn once you get your head around how Rails does things in contrast to other languages. So a couple thoughts. It sounds like you are running on a Linux distro. Ubuntu or Debian it appears from the Apache directory structure. Assuming that, do yourself a huge favor and install Passenger, and scrap the CGI, it''s not worth the effort making it work. Go to http://modrails.org/install.html, and that will list out the installation instructions. Secondly, in your VirtualHosts file, you need to be pointing to your public directory of your Rails apps, not the ROOT_DIR so to speak. So DocumentRoot needs to be like "/home/henry/Projects/Project1/ public". I have always found it easiest to disable the default site, and make my own VirtualHost file from scratch. Here is what one of my VirtualHost files looks like on my Rails web server: =============================================================================<VirtualHost *:80> ServerName iloveorganic.co.uk ServerAlias www.iloveorganic.co.uk DocumentRoot /var/www/sites/iloveorganic/public RailsEnv development PassengerDefaultUser web </VirtualHost> =============================================================================Hope this helps. :) Thanks, Justin On Apr 23, 6:28 pm, Henry Oss <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi > > I am a newbie (which you probably guessed from the subject) and have > just installed ruby 1.8.7, rails 2.3.5 and apache 2.2.12 on ubuntu 9.10. > > I have created a rails app and edited my apache config as shown below. > The Rails "Welcome aboard" page displays, but when I click on "About > your application''s environment" I get > > "Not Found > > The requested URL /public/rails/info/properties was not found on this > server. > Apache/2.2.12 (Ubuntu) Server at localhost Port 80" > > Can anybody tell me what I have done wrong? > > Thanks in advance > > ------------------------------------------------------------------------- > Apache config at /etc/apache2/sites-available/default > <VirtualHost *:80> > ServerAdmin webmaster@localhost > > DocumentRoot /home/henry/Projects/Project1 > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > <Directory /home/henry/Projects/Project1/> > Options Indexes FollowSymLinks MultiViews ExecCGI > AllowOverride All > Order allow,deny > allow from all > AddHandler cgi-script .cgi > </Directory> > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > <Directory "/usr/lib/cgi-bin"> > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > </Directory> > > ErrorLog /var/log/apache2/error.log > > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > > CustomLog /var/log/apache2/access.log combined > > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > > </VirtualHost> > -- > Posted viahttp://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Oh yes, I forgot to tell you how to disable the default site. From the shell run "sudo a2dissite default". Then run your preferred editor, and create a new file in /etc/apache2/ sites-enabled, and name it whatever you want. I usually name it something similar to the domain name of the app or site. If you were to use vi, you do something like: sudo vi /etc/apache2/sites-enabled/project1 I <VirtualHost *:80> .... </VirtualHost> ESC :w :q And then you''d run "sudo a2ensite project1" (or whatever you named the file) And finally run "sudo /etc/init.d/apache2 reload". And walla! :) On Apr 23, 6:28 pm, Henry Oss <li...-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> wrote:> Hi > > I am a newbie (which you probably guessed from the subject) and have > just installed ruby 1.8.7, rails 2.3.5 and apache 2.2.12 on ubuntu 9.10. > > I have created a rails app and edited my apache config as shown below. > The Rails "Welcome aboard" page displays, but when I click on "About > your application''s environment" I get > > "Not Found > > The requested URL /public/rails/info/properties was not found on this > server. > Apache/2.2.12 (Ubuntu) Server at localhost Port 80" > > Can anybody tell me what I have done wrong? > > Thanks in advance > > ------------------------------------------------------------------------- > Apache config at /etc/apache2/sites-available/default > <VirtualHost *:80> > ServerAdmin webmaster@localhost > > DocumentRoot /home/henry/Projects/Project1 > <Directory /> > Options FollowSymLinks > AllowOverride None > </Directory> > <Directory /home/henry/Projects/Project1/> > Options Indexes FollowSymLinks MultiViews ExecCGI > AllowOverride All > Order allow,deny > allow from all > AddHandler cgi-script .cgi > </Directory> > > ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ > <Directory "/usr/lib/cgi-bin"> > AllowOverride None > Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch > Order allow,deny > Allow from all > </Directory> > > ErrorLog /var/log/apache2/error.log > > # Possible values include: debug, info, notice, warn, error, crit, > # alert, emerg. > LogLevel warn > > CustomLog /var/log/apache2/access.log combined > > Alias /doc/ "/usr/share/doc/" > <Directory "/usr/share/doc/"> > Options Indexes MultiViews FollowSymLinks > AllowOverride None > Order deny,allow > Deny from all > Allow from 127.0.0.0/255.0.0.0 ::1/128 > </Directory> > > </VirtualHost> > -- > Posted viahttp://www.ruby-forum.com/. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
"command0" <justinbrinkerhoff-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote in message news:416bec30-fc32-4cf6-a20a-3f67e4d2f6a8-j4dgJDKhKOsKR3bDO0DsXGB/v6IoIuQBratpaaBEXXs@public.gmane.org>Then run your preferred editor, and create a new file in >/etc/apache2/sites-enabledI think you mean creat a new file in /etc/apache2/sites-available since a2ensite wants to create a symlink in sites-enabled to a file in sites-available. Similarly, if one uses the passenger gem rather than the passenger package, one creates files in /etc/apache2/mods-available, and uses a2enmod to create symlinks to them in /etc/apache2/mods-enabled. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''ve always used the gem, and I''ve never once had to run a2enmod, but I suppose it depends on how you do it. If you just add it to the bottom of /etc/apache2/apache2.conf, then you don''t have to do that. Otherwise, yes, you''d have to use a2enmod. Either way, it''s simple to do. Yes, a2ensite does in all actuality create a symlink, but it''s a more seamless way of doing it with distro''s that support the modularised implementation of Apache 2. On Apr 25, 12:21 am, "Joe Smith" <unknown_kev_...-PkbjNfxxIARBDgjK7y7TUQ@public.gmane.org> wrote:> "command0" <justinbrinkerh...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote > in messagenews:416bec30-fc32-4cf6-a20a-3f67e4d2f6a8-j4dgJDKhKOsKR3bDO0DsXHK/AFy3B0O5@public.gmane.orgups.com... > > >Then run your preferred editor, and create a new file in > >/etc/apache2/sites-enabled > > I think you mean creat a new file in /etc/apache2/sites-available > since a2ensite wants to create a symlink in sites-enabled to a file in > sites-available. > > Similarly, if one uses the passenger gem rather than the passenger package, > one creates files in /etc/apache2/mods-available, and uses a2enmod to create > symlinks to them in /etc/apache2/mods-enabled. > > -- > 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. > For more options, visit this group athttp://groups.google.com/group/rubyonrails-talk?hl=en.-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
Thank you both very much. Putting it in sites available did the trick. Henry -- Posted via http://www.ruby-forum.com/. -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.