On Mon, Feb 20, 2006 at 01:12:45PM -0600, Jason Froderman wrote: > Hey everybody. Very new to typo been working with rails some. Really > confused with getting typo up and running in production mode. > > The website is at http://70.86.30.30/html/ (note the subdirectory) > > Only a few things show up and it's all broken. Viewing the source I > see it's referencing: http://70.86.30.30:3000/ > > It seems to be it's referencing what it should when I run script/server > -e production...and if I run that command and navigate to > 70.86.30.30:3000, it works beautifully. It doesn't seem to be showing > the html/ subdirectory at all...probably because :3000 points at it > directly. > > I need it to recognize the subdirectory and I need to better understand > how typo gets up and running and stays up and running. If someone > requests http://70.86.30.30/html, does it start up the necessary > processes to work on Apache or not? > > I've tried all kinds of .htaccess things...including RewriteBase as > described here: http://www.typosphere.org/trac/wiki/TypoInSubdirectory > > I don't have access to the httpd.conf so I setup the symbolic link and > use the .htaccess file as described. Tried just that one line and a > lot of other stuff. > > Per the troubleshooting ideas, I try to run dispatch.fcgi and I get: > Status: 500 Internal Server Error It's pointing to ruby properly...I'm > running Apache/1.3.33 and not finding anything helpful in the logs. > > If anyone could help me understand: > > #1: How typo gets up and running and stays that way... > > #2: Subdirectory problems...
One problem I've found when experimenting with getting subdirectory support working is that typo caches files by default. So if you run it in development mode, it will create an index.html point at the development mode url. If you then switch to production mode, then that index.html doesn't automatically get regenerated. So, try removing index.html and refreshing. As to the .htaccess file, This is what I have to host under /blog/ on my domain. # General Apache options AddHandler fastcgi-script .fcgi Options +FollowSymLinks +ExecCGI AddDefaultCharset utf-8 # Redirect all requests not available on the filesystem to Rails RewriteEngine On # Uncomment this if you're not running Typo in the root of your # webserver's URL space (i.e. http://www.example.com/blog): # RewriteBase /blog/ # try to suggest current rss subscribers that the url moved permently RewriteRule ^xml/([a-z]+)$ /xml/$1/feed.xml [R=301] RewriteRule ^$ index.html [QSA] RewriteRule ^([^.]+)$ $1.html [QSA] RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.fcgi [QSA,L] # In case Rails experiences terminal errors ErrorDocument 500 "<h2>Application Error</h2>Typo could not be reached You might also want to look at this page on the wiki: http://www.typosphere.org/trac/wiki/TypoInSubdirectory -Dom _______________________________________________ Typo-list mailing list Typo-list@rubyforge.org http://rubyforge.org/mailman/listinfo/typo-list