# About your application's environment URL not found

**URL:** <https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498>\
**Category:** Rails\
**Created:** [April 24, 2010, 2:28am UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498 "2010-04-24T02:28:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![osshcs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7c8e57/32.png) [@osshcs](https://www.ruby-forum.com/u/osshcs)\
**Post date:** [April 24, 2010, 2:28am UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498/1 "2010-04-24T02:28:10Z")

</div>

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  
  
Options FollowSymLinks  
AllowOverride None  
  
\<Directory /home/henry/Projects/Project1/\>  
Options Indexes FollowSymLinks MultiViews ExecCGI  
AllowOverride All  
Order allow,deny  
allow from all  
AddHandler cgi-script .cgi

ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/  
\<Directory “/usr/lib/cgi-bin”\>  
AllowOverride None  
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch  
Order allow,deny  
Allow from all

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>

```

---

<div class="post-metadata">

**Author:** ![osshcs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7c8e57/32.png) [@osshcs](https://www.ruby-forum.com/u/osshcs)\
**Post date:** [April 24, 2010, 3:30am UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498/2 "2010-04-24T03:30:43Z")

</div>

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  
[Install — Phusion Passenger™ (a.k.a. mod\_rails / mod\_rack)](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](http://iloveorganic.co.uk)  
ServerAlias [www.iloveorganic.co.uk](http://www.iloveorganic.co.uk)

# DocumentRoot /var/www/sites/iloveorganic/public RailsEnv development PassengerDefaultUser web

Hope this helps. 🙂

Thanks,

Justin

---

<div class="post-metadata">

**Author:** ![osshcs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7c8e57/32.png) [@osshcs](https://www.ruby-forum.com/u/osshcs)\
**Post date:** [April 24, 2010, 3:41am UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498/3 "2010-04-24T03:41:50Z")

</div>

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\>  
…

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! 🙂

---

<div class="post-metadata">

**Author:** ![osshcs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7c8e57/32.png) [@osshcs](https://www.ruby-forum.com/u/osshcs)\
**Post date:** [April 25, 2010, 11:40pm UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498/4 "2010-04-25T23:40:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![osshcs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7c8e57/32.png) [@osshcs](https://www.ruby-forum.com/u/osshcs)\
**Post date:** [April 26, 2010, 7:15pm UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498/5 "2010-04-26T19:15:26Z")

</div>

Thank you both very much. Putting it in sites available did the trick.

Henry

---

<div class="post-metadata">

**Author:** ![osshcs](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/7c8e57/32.png) [@osshcs](https://www.ruby-forum.com/u/osshcs)\
**Post date:** [April 25, 2010, 8:42am UTC](https://www.ruby-forum.com/t/about-your-applications-environment-url-not-found/187498/6 "2010-04-25T08:42:55Z")

</div>

“command0” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote  
in message  
news:removed\_email\_address@domain.invalid…

> 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.
