Forum: Ruby on Rails RoR and Apache2 and app in local directory

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
32b703cdb0ea03c3939b97a93205414f?d=identicon&s=25 John T. (Guest)
on 2006-01-03 08:04
Hi all. I'm at my wits end.. I'm trying to set up a Rails app (on a
Ubuntu system), within the public_html directory in my home directory
(as opposed to the /var/www/ directory). ie. in
/users/john/public_html/myapp

I have a simple app setup, and using the Webrick server it works fine.

But trying to get Apache to work is becoming a pain in the *&^*.

I followed the directions on this page:

<http://wiki.rubyonrails.com/rails/pages/HowToUseRa...

But when I try going to the URL of a controller I get:

"You don't have permission to access /~john/myapp/public/dispatch.cgi on
this server"

I'm guessing it has to do with not having CGI access in the directory,
but I don't know how to get it set up. I haven't touched the default
apache2.conf file (I'm not sure what to add), and adding the line:

  Options +FollowSymLinks +ExecCGI

to the .htaccess file gives an error ('Options' is not allowed in the
.htaccess file)

Does anyone have any hints or tips on what I need to change? I'm sure
it's something in the apache2.conf file (or maybe a file in the
/etc/apache2/sites-available/ directory?)

Thanks a bunch - this seems like a whole lot of hassle to go through
just to get a simple site up and running!

-- John
953c18019bceaa294ae0429bef6ab388?d=identicon&s=25 Norman Timmler (Guest)
on 2006-01-03 12:10
(Received via mailing list)
Am Dienstag, den 03.01.2006, 08:04 +0100 schrieb John T.:
>
>
> just to get a simple site up and running!
>
> -- John

If that is not your server you should tell your administrator to let you
execute CGI scripts. This can be done to set the above Options directive
in the vhost configuration. If your server runs Debian this is in
fact /etc/apache2/sites-available/[your_vhost_file].

If your Administrator is a nice guy he could set the AllowOverride
Options directive in your vhost configuration, so that your .htaccess
Options directive will work.

There is no proof that this will solve your problem, but may help you to
get on the right way.
455ac2a64d06dc8461f4d258d7f7e980?d=identicon&s=25 Michael Trier (Guest)
on 2006-01-03 14:31
(Received via mailing list)
I may be offf base here, but is the owner/group www-data for your
directories / files?

Michael Trier
32b703cdb0ea03c3939b97a93205414f?d=identicon&s=25 John T. (Guest)
on 2006-01-03 14:36
Norman Timmler wrote:

> If that is not your server you should tell your administrator to let you
> execute CGI scripts. This can be done to set the above Options directive
> in the vhost configuration. If your server runs Debian this is in
> fact /etc/apache2/sites-available/[your_vhost_file].
>
> If your Administrator is a nice guy he could set the AllowOverride
> Options directive in your vhost configuration, so that your .htaccess
> Options directive will work.
>
> There is no proof that this will solve your problem, but may help you to
> get on the right way.

Ah ha... it was my own error. It is my own server, so I can make
whatever changes I need. I did have a configuration file in
/etc/apache2/sites-available ... but I had forgotten to create the
corresponding file in /etc/apache2/sites-enabled. Once I did that, I was
able to use the Option ExecCGI in my .htaccess.


Thanks!
This topic is locked and can not be replied to.