Forum: Ruby on Rails Apache FCGI and rails image issues help

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.
JDUNNEUK (Guest)
on 2006-01-03 02:45
Hi guys

 i am usin apache and the fcgi but it cannot see images? i have no idea
why i need to leave them outside the public folder and to access the app
i use localhost/public/app this is the only way i can c the image other
wise its a routin error any ideaS?

Its sounds like a rooting error i agree no prob this is my apache config
as in the vhost

<VirtualHost *>
	ServerName rails
	DocumentRoot "c:/rails/wine/"
	<Directory "c:/rails/wine/public/">
		Options ExecCGI FollowSymLinks
		AllowOverride all
		Allow from all
		Order allow,deny
		AddHandler cgi-script .cgi
		AddHandler fastcgi-script .fcgi
	</Directory>
</VirtualHost>


my app is in a folder C:\rails\wine

i can access it no prob using http://localhost/public/wine/show/1

as in the controller wine etc as this is pointing at the public folder
1st if i change the directory above DocumentRoot "c:/rails/wine/" to
DocumentRoot "c:/rails/wine/public" this works on
http://localhost/wine/show/1 which is correct however i cannot view the
images if i try http://localhost/myimage.gif i get a routing error or
sometimes a method error depending what way i try or my vhost config

any help would be great guys thanks

John
Benjamin S. (Guest)
on 2006-01-03 07:34
(Received via mailing list)
Hi, John.

>  i am usin apache and the fcgi but it cannot see images? i have no
> idea
> why i need to leave them outside the public folder and to access
> the app
> i use localhost/public/app this is the only way i can c the image
> other
> wise its a routin error any ideaS?

I'm not sure what you're saying here. Images are traditionally kept
inside public/images, and accessed at http://YOURBASEURL/images/*.
Routing shouldn't be involved unless you're hitting up a controller.

Again, your problem is not clear, so perhaps you could clarify what
URL is failing.

-Ben
Norman T. (Guest)
on 2006-01-03 10:26
(Received via mailing list)
Am Dienstag, den 03.01.2006, 01:45 +0100 schrieb JDUNNEUK:
> 	</Directory>
> </VirtualHost>

Your DocumentRoot directive should point to "c:/rails/wine/public".
This topic is locked and can not be replied to.