WARNING: This document is out of date! (see TypoWishlist) This begs the question, do we add to the wishlist here, or on the more current page?
FWIW--
IMHO the problem w/all of these nav options is that they typically rely on java/ecma scripts, wh/lieads to browser compatibility issues. One of the cool things about Typo is that it keeps things simple. Navigability always presents a problem but I'd prefer an emphasis on simplicity rather than "cool wizbang just because Apple does it" features.
I'm pretty sure JS are considered ok for all things typo - what with it's heavy use of AJAX and all. I'm sure it wouldn't be too difficult to make things degrade gracefully though (as it probably already does).
Please add your wishlist items here.
A blacklist of regular expressions for use in the spam filter. Don't touch this if you don't know what you're doing
ringtones diethylpropion zelgetbasli www\.leddisplay\.net\.cn www\.LEDdisplay\.net\.cn LED greatwall phentermine online.*casino online.*gambling quick-adult-links tramadol viagra phentermine freett.com hanmail.net warcraft.*gold Good design! alazopram xanax nice site /Members/derik/ Nice site! Great web site Great work! Nice work! My homepage air bed
Before installing Typo, you need to check that your web hosting provider supports Ruby on Rails application. Most of them don't, so choose them carefuly.
For a list of requirements on your web host, see Hosting Typo.
You also need some personal skills, like using a text editor to edit the configuration file. Anything such as Notepad, Textedit or vi will do. You will also need to be able to use a FTP program to upload files, or some command line to install Typo through our nice installer. Common FTP clients are FileZilla, Transmit, or just FTP.
That's it! Now you are all set to go on and install typo from sources or install Typo with typo installer.
svn checkout http://svn.typosphere.org/typo/branches/release_4_1_x typo
instead of
svn checkout http://svn.typosphere.org/typo/trunk typo
to determine the typo version in the trunk
svn info http://svn.typosphere.org/typo/trunk
to determine the typo version that you are running on your machine
svnversion . /typo/trunk
In future you will be able to update to the latest version using
svn update
Please also have a look at the PatchingGuide in case you want to submit your changes back to the project!
FYI if you need to switch an existing "leetsoft" svn installation you can use
svn switch --relocate svn://leetsoft.com/typo/trunk http://svn.typosphere.org/typo/trunkFYI2 if you need to switch an existing "leetsoft" SVK mirror the following will work (via Patrick Lenz typo-mailing list)
svk mirror --relocate //typo/trunk http://svn.typosphere.org/typo/trunk
Please do note that these versions require rails 1.1 (which is included through the magic of svn:externals) and Rake 0.7 (which isn't and I don't think it can be).
I've stubbed out a NewInTheTrunk page with information on what's new in the current version of typo. Hopefully it will become more informative over time.
Note: This is for installing typo on the top level of your domain with one database. Also see http://wiki.dreamhost.com/index.php/Typo
The database layout should now ready.
Note: Typo 2.6.0 does not support Rails 1.1.x | Current Versions (svn) will work with 1.1.x
svn checkout svn://typosphere.org/typo/trunk filenamehere
rake db:migrateor
rake migrate RAILS_ENV=production** If you run into problems with the
rakeprocesses hanging, you may want to fill those tables from within the mysql client, e.g.
mysql -u your_db_user -p -h mysql.your.domain mysql> create database typo; mysql> source db/schema.mysql.sql;
AddHandler fastcgi-script .fcgi
AddHandler cgi-script .cgi
Options +FollowSymLinks +ExecCGI
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/failed_auth.html$ [OR]
RewriteCond %{REQUEST_URI} ^/stats/(.*)$
RewriteRule .*$ - [L]
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
# In case Typo experiences terminal errors
# Instead of displaying this message you can supply a file here which will be rendered instead
#
# Example:
# ErrorDocument 500 /500.html
ErrorDocument 500 "<h2>Application error</h2>Typo failed to start properly"
I found that .htaccess to just leave the index of the directory open so I use the following:
RewriteRule ^$ index.html [QSA]
RewriteRule ^([^.]+)$ $1.html [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !^/stats/(.*)$
RewriteCond %{REQUEST_URI} !^/failed_auth.html$
RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
For now please follow the guide on setting up fastcgi from the rubyonrails page.
script/plugin install http://github.com/fdv/fortythreeplaces_sidebar/
script/plugin install http://github.com/fdv/fortythree_sidebar/
script/plugin install http://github.com/fdv/aimpresence_sidebar
script/plugin install http://github.com/fdv/audioscrobbler_sidebar
script/plugin install http://github.com/fdv/backpack_sidebar
script/plugin install http://github.com/fdv/delicious_sidebar
script/plugin install http://github.com/fdv/flickr_sidebar
script/plugin install http://github.com/fdv/magnolia_sidebar
script/plugin install http://github.com/fdv/recent_comments_sidebar/
script/plugin install http://github.com/fdv/tada_sidebar
script/plugin install http://github.com/fdv/technorati_sidebar
script/plugin install http://github.com/fdv/upcoming_sidebar
script/plugin install http://github.com/fdv/xbox_sidebar
These are third party plugins and are not endorsed by Typo mainteners. Use them at your own risks.
script/plugin install http://github.com/fdv/recentposts_sidebar/trunk/
script/plugin install http://svn.pr.epostero.us/repos/typo/plugins/mp3tunes_sidebar/trunk/
script/plugin install http://pillowfactory.googlecode.com/svn/trunk/plugins/typo_sidebar_twitter/
By Cyril Mougel. Fetches links from Yoolink bookmarking service.
By Frédéric de Villamil. Displays your Blogmarks bookmarks on your Typo blog.
By Jeff. Allows you to add HAML markup to your posts.
script/plugin install http://github.com/fdv/typo_related_posts/trunk
script/plugin install script/plugin install http://svn.nanorails.com/plugins/textlinkads/
There are several import scripts available to import your existing blog into Typo. For example, you can import a WordPress blog into Typo.
These scripts can be found under db/converters/xxxxx.rb
To run these scripts, use them from the command line. Each converter takes specialized parameters, so check what they are by running --help first.
Example:cd db/converters ruby wordpress.rb --help
An example call:
ruby wordpress.rb --db wordpress-database
Q: What to do when you aren't using a relational DB for your original blog? I'm using the default BDB setup for MT. --zenspider
A: Make a copy of your MT blog and run the script that they provide to move it from BDB to a real DB. Then import from there. --scott
There are many ways to install Typo. If you're not sure, just ask your web hosting provider, he'll certainly have an answer to this. If you're hosting Typo on a VPS or a dedicated server, you'll want to check our hosting Typo documentation.
Before you begin the install, there are few things you need to have and do.
You need access to your site and its directory and software to proceed with the installation. These are:
Begin your installation by checking your web host provides Ruby on Rails hosting. Then:
Just go on Typo official download page and download the latest release zip file.
Unzip Typo archive, and open your FTP client and upload Typo on your web hosting, using the account information you were given at subscription time.
Rename your Typo install config/database.yml.example into database.yml, and open it with your favourite text editor. Use your database information you were given by your web hosting.
Then, upload your database.yml file on your Typo installation config directory, and restart your Typo web application.
You will more than likely use MySQL. If so, set the adapter line as "mysql", and your databse name on the "production" line. If your web hosting company has granted you with development and test databses, just fill in the appropriate lines.
Your configuration file should look like this :
login: &login adapter: mysql host: localhost username: john_doe password: sikritpassword development: database: typo_dev <<: *login test: database: typo_tests <<: *login production: database: typo <<: *login
If you're using PgSQL, set the adapter line as "postgresql", and your databse name on the "production" line. If your web hosting company has granted you with development and test databses, just fill in the appropriate lines.
login: &login adapter: postgresql host: localhost username: john_doe password: sikritpassword development: database: typo_dev <<: *login test: database: typo_tests <<: *login production: database: typo <<: *login
If your hosting company has not given you any databse, change quickly! But don't panic, you can still use Typo. Get your favourite towell and just fill in your database.yml file this way :
login: &login adapter: sqlite3 database: db/database.sqlite development: <<: *login production: <<: *login test: database: ":memory" <<: *login
Typo comes with a nice package and installer that allows to automate your installation.
Before you begin the install, there are few things you need to have and do.
You need access to your site and its directory and software to proceed with the installation. These are:
Begin your installation by checking your web host provides Ruby on Rails hosting. Then:
It's the easiest way and the one we would recommend. For this, you need either to be able to install gems on your host or ask your web hosting provider to install it.
$ sudo gem install typo
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ gem install -i ~/gems typo $ ~/gems/bin/typo install /some/path
By default, Typo runs with sqlite, but you can choose to install it on mysql or pgsql as well.
Ensure you or your hosting provider have installed ruby mysql driver.
$ typo install some/path database=mysql db_user=my_app db_name=my_app db_host=localhost db_password=password
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ ~/gems/bin/typo install some/path database=mysql db_user=my_app db_name=my_app db_host=localhost db_password=password
Ensure you or your hosting provider have installed ruby postgresql driver.
$ typo install some/path database=postgresql db_user=my_app db_name=my_app db_host=localhost db_password=password
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ ~/gems/bin/typo install some/path database=postgresql db_user=my_app db_name=my_app db_host=localhost db_password=password
Ensure you or your hosting provider have installed ruby sqlite3 driver.
$ typo install some/path
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ ~/gems/bin/typo install some/path
Typo comes with a nice package and installer that allows to automate your installation.
Before you begin the install, there are few things you need to have and do.
You need access to your site and its directory and software to proceed with the installation. These are:
Begin your installation by checking your web host provides Ruby on Rails hosting. Then:
It's the easiest way and the one we would recommend. For this, you need either to be able to install gems on your host or ask your web hosting provider to install it.
$ sudo gem install typo
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ gem install -i ~/gems typo $ ~/gems/bin/typo install /some/path
By default, Typo runs with MySQL, but you can choose to install it on SQLITE or pgsql as well.
Ensure you or your hosting provider have installed ruby mysql driver.
$ typo install some/path db_user=my_app db_name=my_app db_host=localhost db_password=password
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ ~/gems/bin/typo install some/path db_user=my_app db_name=my_app db_host=localhost db_password=password
Ensure you or your hosting provider have installed ruby postgresql driver.
$ typo install some/path database=postgresql db_user=my_app db_name=my_app db_host=localhost db_password=password
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ ~/gems/bin/typo install some/path database=postgresql db_user=my_app db_name=my_app db_host=localhost db_password=password
Ensure you or your hosting provider have installed ruby sqlite3 driver.
$ typo install some/path database=sqlite
If you don't have root access on your hosting server, then try this instead:
$ export GEM_PATH=~/gems $ ~/gems/bin/typo install some/path database=sqlite
Discuss ways to market Typo to the public!
List your ideas here:
MarsEdit is a weblog editor for Mac OS X that makes weblog writing like writing email—with spell-checking, drafts, multiple windows, and even AppleScript support.
It works with various weblog systems.
Link: MarsEdit
Excellent commercial blogging software at http://www.sixapart.com/movabletype/
Import works both from MT 3.0 and MT 2.6. See HowToImport
article_html(@article, :body)in place of
@article.body_html, there are other, similar helper methods in source:trunk/app/helpers/application_helper.rb
page_headerhelper. Take a look at source:trunk/themes/azure/layouts/default.rhtml to see what's changed.
<notextile> Creating a patch </notextile>
1. Get typo ready for patching
Blatantly ripped from http://dev.rubyonrails.com
See wiki:CodingStyle
Seriously, any patch that isn't a behavior neutral refactoring must come with tests. Give me a failing test suite that explains the functionality you need and I'll be far happier than if you give me a fabulous patch that does everything you want, but which doesn't explain itself with tests.
And yes, I know I've broken the 'new functionality => new tests' rule on occasion, but I usually end up paying for it the hard way.
railsroad is a blog written by a complete Ruby newbie.
On this blog, Bryan attempts to convert into words all his experiences with Ruby and Rails.
RedCloth is a module for using Textile in Ruby.
Textile is a text format. A very simple text format. Another stab at making readable text that can be converted to HTML.
Link: RedCloth
For usage examples see Textile Reference.
With all the new features, new admin interface, ajax and script.aculo.us goodness that we've poured into the trunk over the past week I think we should take a look at the outcome and see if there is anything we could improve on and are there any areas that need attention.
We need feedback from the people using trunk code to see what areas they might have problems with in terms of usability.
One of the reasons for calling Quick Post (in the articles section) , Quick Post was because it was for when you wanted to post a quick blog with no extended or extra options. The primary create page has all of the advanced options that allow users to use them when they need them.
Blacklist and Categories both have redundant places to create new items. This causes us to have two links to perform the same overall action (adding something). I think we should probably knock these down the the quick create. We cold possibly have a fallback for users who don't have JS enabled, but I don't see that as being an issue considering it's pretty much required to have JS enabled to use the Typo admin features so it renders the new screens useless.
Is this the best way to implement this? Are there things we could do to improve it and make it easier or more natural for users?
-- It seems to me that the configuration information for each sidebar entry should popup on selecting that particular sidebar entry but should not be inline in the ajax ordering component. As a simple rational for this imagine a user defined quote component, if you wanted to display all the existing quotes inside the ordering component that would be rediculous. Just display name/description for the drag and drop interface and do the configuration for the currently selected component along one side.
I think we could make use of some ajax here (doesn't reallly have to use ajax, we could just reload the page) and get rid of the edit screen by expanding the box for user X with a form for filling out this information.
Are the show areas required for all areas, or would it be better to just link to the edit screen? For instance there really isn't any need to see a Blacklist pattern rendered in html. Why not just link to the edit screen that way users could edit and view the blacklist pattern at the same time.
Are the delete screens required? We already have a requirement of JS enabled, why do we need to go to a new screen to delete an item, JS confirmation?
Should we provide notes or small descriptive paragraphs in areas of the admin to explain what different areas do?
We need to write more test to match the new features and functionality we've added.
Great discussion. I was thinking of splitting the admin tabs into two "Focus groups" The main navigation would only have Articles and Pages which are the essence of typo. You would have to click on Settings to reach a new menu with all the other current tabs. This settings link can be quite out of the way, much like log off and your blog links are right now. Backpack uses this type of UI. -- Tobi
Great idea Tobi. We could get rid of the General tab and Cache tab in one swoop and start getting the nav back to what Typo is built for--Blogging. I see how we could also get rid of the categories tab. We could put a "or Create New Category" under the select list when creating a new article. This presents another problem of how do we expose the remaining parts of the category section to the user. -- Justin
I'm new to Typo, and the overall impression is great -- easiest install EVAR! My wishlist is short: I'd like to be able to turn off the realtime preview in page/post creation mode. Not necessarily as a global preference, but even just on the page itself. Sometimes the latency / media files getting constantly reloaded can be a little distracting when I'm trying to write. Hopefully someday soon I'll be well versed enough in Typo to make a patch myself. Until then, thanks! -- Chris
On 'Redundant Create/Add/New X Pages': If you are interested in having a "quickpost" type feature (which I have seen implemented in several forums I frequent and think it is generally a meritous feature), why not have the controller component determine which type to render based on a preference, with a button on the "quick" version to reveal the "advanced" version? -- Kolonay
Kolonay--that's not bad, but I think we can do better. Personally, I'm starting to hate all of the create/edit pages. I'd like to replace them with a "create" page, and make it the default page when someone goes to /admin. Basically, it would have a row of tabs across the top ("New blog post", "New static page", "New audio/video file", with more to come), and then underneath that would be the editing form for whatever we're creating. The point is that the number one reason to visit the admin pages is to create new content, so why not make that the default? We could then retire the old create/edit pages and have them point back to the create page.
Ruby on Rails version 2.0.2
MySQL version 4.1 or greater, PostgreSQL 7.0 or later or SQLLite.
That's really it. We recommend Apache along with mod_rails as the most robust and featureful server for running Typo, but any server that supports CGI or proxy and MySQL will do. That said, we can’t test every possible environment and each of the hosts on our hosting page supports the above and more with no problems.
Here's a letter you can send to your host; copy and paste!
I'm interested in running the open-source Typo <http://typosphere.org/> blogging software and I was wondering if my account supported the following: Ruby on Rails 2.0.2 MySQL 4.1 or greater The mod_rewrite Apache module Thanks!
Google analytics suport
Feedburner support
Improve theme editor
Add helpers to themes
Password protected posts
Restricted access posts (to logged in users)
This page is made to gather discussion about Typo 5.2 release.
Migration to Rails 2.1
Autocomplete for FCK Editor
À la wordpress plugins API
Image(typoadmin-20070824-01.jpg)
Typo settings
Image(typoadmin-20070824-02.jpg)
Typo posts listing
Image(typoadmin-20070824-03.jpg)
Typo editing zone
You can setup typo so that the web administrative interface is encrypted but it will require some configuring of your web server. Here's how to do it in lighttpd with mongrel. First, setup typo with mongrel at a port on your server. Then, you will need to buy or generate a certificate for your web server to use if you don't already have one. The following command will ask you some questions and then generate one if you have openssl installed.
user@host$ openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
Put the generated server.pem in /etc/ssl or someplace safe. Then, use the following lighttpd config (this will require that lighttpd is compiled with ssl support and a version at 1.4.19 or later).
$HTTP["host"] =~ "yoohoo.yourdomain.com" {
$HTTP["scheme"] == "http" {
server.document-root = "/usr/home/myname/typo/public/"
accesslog.filename = "/usr/home/myname/typo/log/lighty-access.log"
$HTTP["url"] =~ "^/(admin|accounts)" { url.redirect = ( "^/(.*)$" => "https://yoohoo.yourdomain.com/$1" ) }
$HTTP["url"] !~ "^/files" { proxy.server = ( "" => (( "host" => "127.0.0.1", "port" => 9517 ))) }
}
}
$SERVER["socket"] == "72.34.55.79:443" {
ssl.engine = "enable"
ssl.pemfile = "/etc/ssl/private/server.pem"
server.name = "yoohoo.yourdomain.com"
server.document-root = "/usr/home/myname/typo/public/"
accesslog.filename = "/usr/home/myname/typo/log/lighty-access.log"
$HTTP["url"] =~ "^/(admin|accounts)" { proxy.server = ( "" => (( "host" => "127.0.0.1", "port" => 9517 ))) }
}
You will need to tailor the above config to your own setup, replacing the domain, paths, mongrel port, and socket IP address with your own info. This setup will redirect all requests sent to http://yoohoo.yourdomain.com/admin or accounts/ to https. Once you're in https encrypted mode, you won't have to worry about falling into http as lighttpd sends a "X-Forwarded-Proto: https" header to rails that forces everything to be encrypted (you'll have to set this header yourself in Apache). Also, you will need to load the mod\_proxy, mod\_accesslog, and mod_redirect modules at the top of your lighttpd.conf in order to use the above config.
Excellent online todo lists by 37signals
TextDrive is a hosting company run by and for people who love publishing on the web.
TextDrive is the right choice for those who use and wish to support free, open-source publishing applications such as Typo, Textpattern, Wordpress, Instiki and frameworks such as Ruby On Rails. They provide excellent support for the open-source scripting languages PHP, Ruby, Perl and Python, and databases such as MySQL, PostgreSQL and SQLite. They also provide support for Lighttpd, FastCGI, and a boat-load more. Find out more at TextDrive
Textpattern is a content managment system often used for weblogs, but suitable for other types of sites. It was originally written by Dean Allen and now has several other activly contributing developers. The community is quite vibrant and many plugins can be used to enhance it's funtionality.
This is an index of pages describing how to install and run Trac on specific platforms and operating systems.
All pages are on the TracProject website, since they tend to be edited quite often.
----
See also: TracInstall, TracGuide, TracFaq
By following these instructions, you will set up Apache to automatically serve multiple Trac projects for you.
Start out by creating a project directory in your documentroot (/var/www in this example). Projects will be accessed as http://hostname/projects/projectname. Copy (or symlink) trac.cgi to this directory together with a file named index.html. This will be shown when users try to access nonexistent projects.
Then create your trac projects with trac-admin. It's important that they are all placed in the same directory. In this example we'll use /var/lib/trac. Add to your Apache configuration:
RewriteEngine on
RewriteRule ^/projects/+$ /projects/index.html [L]
RewriteCond /var/lib/trac/$1 -d
RewriteRule ^/projects/(:alnum:+)(/?.*) /projects/trac.cgi$2 [S=1,E=TRAC_ENV:/var/lib/trac/$1]
RewriteRule ^/projects/(.*) /projects/index.html
<Directory "/var/www/projects">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
AddHandler cgi-script .cgi
Order allow,deny
Allow from all
</Directory>
<LocationMatch "/projects/:alnum:+/login">
AuthType Basic
AuthName "trac"
AuthUserFile /path/to/trac.htpasswd
Require valid-user
</LocationMatch>
Make sure you have the rewrite module loaded or compiled in Apache.
LoadModule rewrite_module modules/mod_rewrite.so
Now, when you add another project, you don't need to edit any apache config. The only file you may want to edit is index.html to make it list the new project. If you think this is too much work, replace it with a python cgi script that does it for you.
TracStandalone and TracModPython can also serve multiple projects.
----
See also: TracGuide, TracInstall
While Typo isn't all that complex of an application, it can be challenging to install in some environments. Shared hosting providers like Dreamhost and Textdrive can be especially challenging for many users.
Here are a few debugging steps that we've found to help when problems occur. We'll assume that you're trying to run Typo in production mode under Apache, although most of the steps are the same for other HTTP servers.
The most common error that we see is people who are completely unable to access Typo at all, receiving a '500' error from Apache and a statement like "Application Error / Typo could not be reached". There are a number of different things that can cause this error. Here are a few things to try:
1. Run public/dispatch.fcgi by hand from the command line. If this fails with an error like "can't find interpreter for public/dispatch.fcgi" then check out the first line of the file. Verify that you have Ruby installed and edit dispatch.fcgi to have the first line match. Make sure that there isn't a hidden carriage return at the end of the first line--this can happen if you upload Typo via Windows. Run 'cat v public/dispatch.fcgi | head -1' and make sure that there's no hidden '^M' at the end of the line. If this still fails to get dispatch.fcgi working, then try running 'ruby public/dispatch.fcgi'. If that works then spend another minute or two looking at the first line of dispatch.fcgi-it's probably still wrong. If that doesn't help, then send mail to the Typo mailing list with as many details as possible, and we'll see what we can do.
2. Look at your Apache logs, especially the error.log. This will frequently contain much more error detail then you see via your web browser.
3. Look at Typo's log files. They're in log/production.log and log/fastcgi.crash.log.
4. Verify that your web user has write access to log/* and public/*.
5. Verify that you have the ability to use .htaccess files, and that Apache is seeing the one in public/.htaccess. Typo needs several lines from this file in order to work correctly.
6. If you're running Typo in a subdirectory of your web server, then see TypoInSubdirectory.
7. If you are getting null headers, check more closely your database config. Be sure that the database driver for Ruby is installed. u/p
8. If you are using MySQL 5.0 check out this fix for Active Record
9. Make sure your database permissions are set up correctly. Ex., if MySQL is used, is your user and host set up to access your database?
10. Make sure your database config are set up correctly. Run script/console by hand from the command line. Execute "Article.find(:all)". If this fails with an error like 'Errno: ENOENT: No such file or directory - /tmp/mysql.sock' maybe you must set socket in config/database.yml. Ex: 'socket: /var/run/mysqld/mysqld.sock'.
/usr/lib/ruby/1.8/cgi/session/pstore.rb:25:in @[]='
clear your "sessions" table to correct the problem.
Further if you try to run public/dispatch.fcgi from your shell you get an error like...
sh: no such file or directory: public/dispatch.fcgi
The line-endings in public/dispatch.fcgi are DOS-type rather than UNIX-type because of the edit. Open the file with
vim public/dispatch.fcgiand either delete the ^M in the first line or if there isn't one type
:set fileformat=unix, then
zz, this should fix the line endings.
posted X minutes agopassages and as such the browser timezone matters there vs. server timezone in the admin interface
JS/Exploit-CrossSite, there is in fact nothing wrong at all. One of the files in source:trunk/vendor/bluecloth/tests has a lot of x's in it. It appears a particular series of x's and whitespace triggers this out-of-place virus warning from McAfee's products. Please contact McAfee for a fix to this issue if it bothers you.
Ok, I had some problems using Typo in conjunction with scgi and Apache2. Using the proposed config from the SRR tutorial resulted in not working themes. So i added another rule which seems to work:
# handle all requests throug SCGI
SCGIMount / 127.0.0.1:YOUR_PORT
<LocationMatch \..+$>
# don't handle those with SCGI
SCGIHandler Off
</LocationMatch>
<LocationMatch ".+/theme/.+">
# don't handle those with SCGI
SCGIHandler On
</LocationMatch>
<Directory "/YOUR_PATH/typo/public">
Options +FollowSymLinks
Order allow,deny
allow from all
</Directory>
I hope it helps.
RewriteRule ^([^.]+)$ /typo/$1.html [QSA]
#AddHandler fastcgi-script .fcgi AddHandler fcgid-script .fcgi
When using Origami v1.0, you might get an error when you view an article. The solution is simple: edit
themes/origami/views/articles/read.rhtmland change
full_htmlto
body_html.
This is where you configure the overall settings for your blog.
Blog name: The name that shows up at the top of your blog
Blog subtitle: The subtitle that shows up right beneath the blog name
Blog URL: The URL for your blog, Typo will automatically try to guess this so you don't have to set it.
Latitude, Longitude: You can embed your physical location into every webpage served up by your blog so that everyone knows where you're blogging from.
Show blog name: Your blog's name will be added to the page titles at the top of every webpage. These page titles are shown at the top of the browser and are used any time someone bookmarks a webpage. This might also help for search engines.
Image(settings_general-settings.jpg)
Display X articles on my homepage by default: The number of articles that will be put on every webpage that shows a list of articles, for example, the archives for May will have these many articles shown on every page.
Display X articles in my news feed by default: The number of latest articles shown in your feeds
Show full article on feed: If this isn't checked, any extended content in your articles isn't included in your feeds.
Editor: Typo now includes the TinyMCE visual editor so it's easier to use the web admin to write articles. You need to enable it to use it. Typo will generate an AJAX live preview that you can turn off if it's too slow.
Article filter: You can use various markup languages when you write your articles.
Comments filter: You can let commenters use various markup languages when they write their comments.
Send trackbacks: If this is enabled, Typo will automatically try to send a trackback to any blog posts that are linked from your own blog post and try to ping any URLs that are listed in the next option. Both trackbacks and pings are turned off when this option is unchecked.
URLs to ping automatically: You can ping various services to make them aware of your new blog posts. Some example URLs would be http://blogsearch.google.com/ping or http://rpc.icerocket.com:10080/ (I'm not sure if these two actually work, I'll check and make sure).
Disable trackbacks site-wide: If you're getting hit by trackback spam and want to quickly disable new trackbacks for every article on the blog, check this option.
Enable Trackbacks by default: Any new articles that you write will have trackbacks enabled by default.
Enable comments moderation: All comments and trackbacks will not be posted to your blog until you moderate them in the web admin (click on DISCUSS on the admin tab at the top).
Enable comments by default: Any new articles that you write will have comments enabled by default.
Show your email address: A mailto link with your email address will be added to your name for every blog post.
Enable gravatars: Gravatars are avatar images that can follow you everywhere, Typo support can be enabled by checking this option.
Allow non-ajax comments: If you're getting spammed a lot, you can try unchecking this option to see if it helps. It might stop spammers who don't have javascript in their spambot.
Disable comments after X days: Comments will automatically be closed X days after you publish a blog post. This is a way to avoid spam comments that might come in a long time after a blog post is published.
Max Links: Another way to handle spam is to flag comments or trackbacks that have too many links in them. You can set the threshold above which to flag them here and those comments and trackbacks will be flagged for moderation and will not be posted. Note: this feature will not be enabled unless you enable spam protection below.
Source Email: If a user sets up his account to receive notifications, Typo will send the user emails to their email address with this address as the source.
Jabber account: Jabber account from which to send all jabber notifications
Jabber password: Password to access the above Jabber account
Image(settings-notifications.jpg)
Enable spam protection: Various spam protection features, like local blacklists or checking external spam lists (surbl.org, for example), are enabled. Akismet is a spam filtering service that is provisionally enabled when you check this option, assuming you enter a proper Akismet key below.
Akismet Key: You must go to the Akismet website and get a key from them in order to use their service. Enter the key Akismet gives you here.
Image(settings_spam-protection.jpg)
These settings are used when you add a resource (like an mp3 or video) to a blog post. This information will only be added to the news feed for your blog so that people can view this info in iTunes.
Empty Fragment Cache: Clicking this link will empty your entire cache. Typo saves all your webpages to a cache so that it doesn't have to rebuild an entire webpage or RSS feed every time someone downloads it.
Rebuild cached HTML: Clicking this link will sweep all the HTML in the cache. Each webpage will be regenerated when someone tries to download it again.
You can compose new articles or pages here.
This is where you write blog posts.
Title: This is the title of your blog post. It will also be used to create a permalink for this blog post.
Article Content: This is where you write your blog post. If you want to split your post into an introductory portion that goes on the front page of your blog and extended portion that is only available once you click on the blog post, put the introductory paragraph here and the extended portion in the extended content section below.
Toggle Extended Content: This is where you put the extended portion of your article, that will not be available on the front page of your blog but only when someone clicks on the blog post, as explained above. You can also configure your news feeds to not show this extended content in the General Settings.
Categories: Typo has two classification systems in place, categories and tags. You can add more categories by going to the MANAGE section and adding them there. Highlight the categories that will apply to this post and they will be applied when you click Save below. The generally accepted way Typo users apply categories and tags is to have a few general categories and many smaller, more specific tags.
Tags: Enter any tags you want to use for this post here, separated by spaces. Tags are generally used for more narrow or specific classification, as explained above. You can enclose tags in quotes (single or double quotes) to create multi-word tags ('greatest blog post ever', for example) or create standalone tags made up of letters, numbers, and _ or . (my_greatest_tag irc_2.0).
Article Attachments: You can attach a resource (like an mp3 or video) to the blog post here. These resources will only be uploaded and included with any feeds once attached. To include them in your blog post, you must also link to them from the text of your blog post. Resources will be placed in the files directory so you would link to a resource called play_on_playa.mp3 by linking to !http://yourblog.com/files/play_on_playa.mp3 from your blog post and then uploading it using this option.
Permalink: The permalink is normally generated from the title of your blog post. You can set a custom permalink here. For example, a blog post titled 'Welcome to the Typo' would normally have a URL that looks like !http://yourblog.com/articles/2007/04/27/welcome-to-the-typo. You could change that last part based on the post title to anything you want.
Allow comments: Allow commenters to post comments for this particular post
Allow trackbacks: Allow other blogs to post trackbacks for this particular post
Published: If this option is checked, this article will be published on your blog as soon as you save it. If you leave this unchecked, you can use the next option to write the post now but publish it at some future date.
Publish at: If you didn't check the previous option, you can set a future date at which time this blog post will show up on your blog. This is useful if you want to write a post ahead of time and have it automatically appear on the blog at a future date.
Textfilter: Choose a markup language for your post. Find out more about the installed text filters in the DESIGN section.
Pages are for blog webpages with no comments. You can write pages describing the blog or blogger, or whatever else you just need to put on a webpage somewhere.
Title: The title is used for the title of the generated webpage.
Location: Used to create the URL for this page
Body: This is where you write the content of your page.
Textfilter: Choose a markup language for this page. Find out more about the installed text filters in the DESIGN section.
This is where you manage existing content that you've written.
You can look over existing articles here and look at comments or trackbacks for each article. This is where you go if you want to edit an article or its associated comments or trackbacks.
Existing pages are listed here so you can edit them as you see fit.
This is where you add categories for your blog. As mentioned in the section on writing an article, categories are generally used for a small amount of high-level classifications. You can quickly create a new category here or edit existing categories.
You can upload a new resource or edit your existing resources here. A resource is any file that you upload to the server, that you can then attach to your blog posts. Resources can be pdfs, images, audio, or video, any file that you want. When you attach a resource to an existing post (either when you write the post or by going to the Manage Articles section and adding it later), it's added as an enclosure to that post in your feed. However, a resource will not be shown in your blog post unless you link directly to it. Resources will be placed in the files directory so you would link to a resource called juicy.mp4 by linking to !http://yourblog.com/files/juicy.mp4 from your blog post.
This is where you handle comments and trackbacks, content added by visitors to your blog. You moderate what feedback will be published to your blog here. You can search through all your feedback using the search form or use the checkmark interface to quickly categorize all the feedback. For example, you can check off all the comments that you think are spam (spam comments are junk comments) and click the 'Mark Checked Items as Spam' button. You can do the same for ham comments (ham is the opposite of spam, ham comments are the ones you want to keep), delete any comments you don't want, or confirm the categorization for comments that have a question mark by their categorization (ham? or spam?). Akismet (if you have it configured) and the other spam protection features will try to categorize any incoming feedback: you can use this interface to track what is going on and make any corrections necessary. You can also set up your own custom blacklists here, as explained next.
You can setup your own spam filters for your blog here. Blacklists are strings or regexes (short for regular expressions) that you want Typo to look for, feedback with those characteristics will be blocked and sent to the DISCUSS section for moderation. Blacklists are only applied if spam protection is enabled in the General Settings. Also, you can only use blacklists toward the title of a trackback or body of a comment or trackback. You cannot currently write a local blacklist to filter the name or the IP or email addresses of commenters, although any IP addresses and URLs are checked against external blacklists if spam protection is enabled. String blacklists are just a simple string to look for, stuff like cialis or viagra or software offers. Regex blacklists allow you to block more complicated possibilities:
c[i1]a[il71]+s - this regex will block multiple possibilities like cia7is or c1a71s, among others
[mM]\1 (and|\&) the f(un)ky b\3ch - this regex will match 'Marky mark and the funky bunch' or 'marky Mark & the funky bunch', plus other slight variations
You can find out more about Perl-compatible regular expressions and write all kinds of regexes, though they should probably be a last resort for Typo spam filtering.
This is where you customize the look and front-end options of your blog.
This is where you configure your sidebars.
This is where you can periodically change your themes. You can pick from all the themes you have installed.
This is where you edit or delete users.
This is where you upload multimedia content?
You can use some preexisting text filters here or create your own.
TypoGarden.com [http://www.TypoGarden.com] is a source of Typo Themes developed by the Typo community. Still under development but themes are available at this time.
If you wish to run Typo in a subdirectory of a web server (something like http://www.example.com/blog, instead of http://www.example.com or http://blog.example.com), then you need to make a couple small tweaks to Typo's install.
First, don't unpack Typo into a subdirectory of your web server. Put it somewhere outside of your web space and then use an Apache Alias (or something similar if you aren't using Apache) to link Typo's public/ directory into your webserver's namespace. If you have the ability to edit your Apache configs directly, then you'll want something like this
FastCgiConfig -initial-env RAILS_ENV=production Alias /subdirectory /path/to/rails/app/public <Directory /path/to/rails/app/public> Options ExecCGI FollowSymlinks AllowOverride All </Directory>If you're using a hosting provider, then check with them; almost all of them give you a tool for doing this via your site administration panel. If they don't, you can create a symlink from
/subdirectoryto
/path/to/rails/app/publicHere's the command to use if you have shell access:
ln -s /path/to/rails/app/public /subdirectory
config/environment.rbto enable production mode (as explained in
README).
Once this is done, you'll need to edit
public/.htaccess. Look for the
RewriteBaseline. Uncomment it and change it to match the subdirectory that you're using. If you want to put your blog into http://www.example.com/typo, then make sure that it says
RewriteBase /typo
This should be all that you need.
Most of these techniques are derived from http://creativi.st/blog/articles/2005/06/10/railing-in-subdirectories
If you get 400 errors when trying to access your public directory without the trailing slash, i.e. www.yoursite.com/typo/ works fine but www.yoursite.com/typo breaks with a 400 error, see the tip on this page: http://www.bigbold.com/snippets/posts/show/560 There are a ton of ways to remedy this, some uglier than others, but this seems to be the cleanest.
Okay, I've spent some time configuring one of my FreeBSD servers to host multiple instances of Typo running via FastCGI processes ala Lighttpd, proxied by Apache2, each as a dedicated user. Like everything, there's more than one way to do it and somebody else probably has figured out a more better, more slicker way, but this is how I'm doing it at present. Your mileage may vary. Caveat emptor, etc.
The easiest way to install all of the required software on FreeBSD is to install them via the FreeBSD Ports Collection. If you need to learn how to use Ports, visit the FreeBSD Handbook page on Using the Ports Collection.
Note: Ken just spent a lot of time tracking down an issue w/help of pdcawley (thanks bunches bud!). If you encounter ruby dumping core, bus errors and error.log entries looking like this:
2006-03-18 15:30:50: (mod_fastcgi.c.2430) unexpected end-of-file (perhaps the fastcgi process died): pid: 27650 socket: unix:/tmp/typo-yourblog.socket-1 2006-03-18 15:30:50: (mod_fastcgi.c.3172) child signaled: 4 2006-03-18 15:30:50: (mod_fastcgi.c.3215) response not received, request sent: 982 on socket: unix:/tmp/typo-youblog.socket-1 for /dispatch.fcgi , closing connection
then use the ruby-nopthreads port.
Install Apache2 with mod_proxy modules built in (the port disables this by default, so it needs to be implicitly called)cd /usr/ports/www/apache2 make WITH_PROXY_MODULES=yes install clean
Then, to insure that Apache2 is automatically built with mod_proxy modules in the future
echo "WITH_PROXY_MODULES=yes" >> /etc/make.conf
Install Ruby On Rails
cd /usr/ports/www/rubygem-rails; make install clean
If you want Textile formatting (if you don't know, you do) install Redcloth
cd /usr/ports/www/rubygem-redcloth; make install clean
Install FastCGI library for Ruby
cd /usr/ports/www/ruby-fcgi; make install clean
Install FastCGI Development Kit
cd /usr/ports/www/fcgi; make install clean
Install mod_fcgid
cd /usr/ports/www/mod_fcgid; make install clean
in /usr/local/etc/apache2/httpd.conf add the following to the 'LoadModule' section:
LoadModule fcgid_module libexec/apache2/mod_fcgid.so
<IfModule mod_fcgid.c>
AddHandler fcgid-script .fcgi
</IfModule>
Restart apache2
apache2ctl restart
If there were no errors written to screen, ensure that none were written to log
tail -n 50 /var/log/http-*
If there are no errors, continue on to Installing Typo.
Install Typo Stable
or
Install Typo Current from Trunk using Subversion (NOTE if you need subversion, install it with 'cd /usr/ports/devel/subversion; make install clean')
svn checkout svn://typosphere.org/typo/trunk typo
Configure a directory scheme. I use the follwoing:
/home/username/websites/typo.somedom.tld
Copy Typo to your target directory
cp -R typo /home/username/websights/typo.somedom.tld
Set ownership to your user
chown -R username:username /home/username/websites/typo.somedom.tld
There are some Typo files needing modification. FreeBSD's bash port is installed in /usr/local/bin/bash rather than /usr/bin/bash.
Later versions of Typo use /bin/sh but you should double check.
I also had to modify some other paths of a few files in public to get my statup scripts to work during reboot.
It was a bit perplexing for a while there, as I could run them manually from command line, but they failed upon actual reboot.
/usr/bin/env ruby
/usr/local/bin/ruby
_(This is because /usr/local/bin isn't in your path when lighttpd runs. Try explicitly appending it to your path in the
lighttpd init script)_
Assume you can create database and set access as appropriate. I'm using MySQL, e.g.:
mysql -p create database username_typo; grant all on username_typo.* to 'username'@'localhost' \ identified by 'somekillerpassword'; flush privileges; use username_typo; source /path/to/db/schema.mysql.sql;
Edit config/database.yml as appropriate to mesh with above.
Edit config/lighttpd.conf. Specify bind address and port, username, groupname, etc., e.g.:
server.pid-file = "/var/run/typo-username.pid"
server.port = 3000
server.bind = "127.0.0.1"
server.event-handler = "freebsd-kqueue"
server.name = "typo.username.com"
server.username = "username"
server.groupname = "username"
server.modules = ( "mod_rewrite", "mod_fastcgi", )
server.indexfiles = ( "dispatch.fcgi" )
server.document-root = "/home/username/websites/typo.username.com/public/"
server.error-handler-404 = "/dispatch.fcgi"
server.errorlog = "/home/username/websites/typo.username.com/log/error.log"
url.rewrite = ( "^/$" => "index.html", "^([^.]+)$" => "$1.html" )
#### fastcgi module
fastcgi.server = (
".fcgi" => (
"typo" => (
"min-procs" => 4,
"max-procs" => 4,
"socket" => "/home/username/tmp/typo-username.socket",
"bin-path" => "/home/username/websites/typo.username.com/public/dispatch.fcgi",
"bin-environment" => ("RAILS_ENV" => "production" ),
"idle-timeout" => 120
)
)
)
./script/lighttp & netstat -na | grep 3000 kobuk# netstat -an | grep 300 tcp4 0 0 127.0.0.1.3000 *.* LISTEN
Open a browser to !http://127.0.0.1:3000
Note fro Ken: Above was edited from original author's text. Original author does not run a web browser on the server running their blogs. Initial text assumed you have access to the port, e.g. 3000 on the server in question. So I stand by my original instructions:
Point your web browser to typo.username.com. Or whatever your server is named;-)
If you're not seeing your bright shinny new blog, enable vebose logging in your my.cnf and make sure typo is actually connecting to MySQL. Assuming you've gotten this far and all is well, I move config/lighttp.conf to /usr/local/etc/username_typo.conf because I don't want my end users tweakig their config and doiong lame things like setting min-procs to 2000....
To get Apache2 set up to proxy incoming requests on port 80 you need to modify /usr/local/etc/apache/httpd.conf
<VirtualHost xxx.xxx.xxx.xxx:80>
ServerAdmin webmaster@username.tld
ServerName typo.username.tld:80
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine On
RewriteRule ^/(.*) http://127.0.0.1:3000/$1 [P,L]
ProxyPassReverse / http://127.0.0.1:3000/
</VirtualHost>
Don't forget the ProxyPreserveHost else everything will look like it's working but routes will see 127.0.0.1:3004 as incoming hostname and use it to write all the internal rss links.
Restart Apache2
apache2ctl restart
You should now be able to access your Typo site via port 80.
Now we need to get a start up script happening to start/stop Typo on system srtart/shudown.
There's lots of ways to do this but I took a stab at doing it at least minimally conrrectly for FreeBSD by using /usr/local/etc/rc.d and /etc/rc.conf.local. You could do lots better than this, but here's my modified lighttpd.sh:
#!/bin/sh
#
# $FreeBSD: ports/www/lighttpd/files/lighttpd.sh.tmpl,v 1.3 2005/02/06 16:30:35 sem Exp $
#
# PROVIDE: lighttpd
# REQUIRE: DAEMON
# BEFORE: LOGIN
# KEYWORD: FreeBSD shutdown
# kg rc.d script to start instance of typo running under FastCGI via lighttpd
# as dedicated user on dedicated port, e.g. 3000. Then proxy via Apache
#
# copy lighttp.conf included with typo distribution to /usr/local/etc
# and modify as necessary to suit your setup
#
# Add the following lines to /etc/rc.conf or /etc/rc.conf.local
#
#typo_${blogname}_enable="YES"
#typo_${blogname}_conf="/usr/local/etc/typo${blogname}.conf"
#typo_${blogname}_chdir="/path/to/the/typo/instance/you/wish/to/run/"
#
#
. /etc/rc.subr
name=typo_username
rcvar=@set_rcvar@
# specify here just incase we space out and forget to put it in lighty config.
RAILS_ENV=production
export RAILS_ENV
command=/usr/local/sbin/lighttpd
pidfile=/var/run/typo-username.pid
required_files=${typo_username_conf}
stop_postcmd=stop_postcmd
stop_postcmd()
{
rm -f $pidfile
}
# set defaults
typo_username_enable=${typo_username_enable:-"NO"}
typo_username_conf=${typo_username_conf:-"/usr/local/etc/typo_username.conf"}
typo_username_chdir=${typo_username_chdir:-"/nonexistent/"}
load_rc_config $name
command_args="-f ${typo_username_conf}"
run_rc_command "$1"
Then in /etc/rc.conf.local:
typo_username_enable="YES" typo_username_chdir="/home/username/websites/typo.username.tld/"
I just create a separate typo_username.sh for each blog. It would be much slicker to have this all in one .sh file and loop through the typo instances, e.g. the way FreeBSD's /usr/local/etc/rc.d/zope.sh does but I'm not a rc.d scripting guru so it will have to wait until I have more time....
And that's about it. Repeat as necessary. End result is multiple instances of Typo, each running as separate user, on dedicated high numbered port via FastCGI all being proxied by an Apache front end. This is quick and dirty wiki page. I'm sure I made a typo here or there (no pun intended) but xal asked me to post it and I wanted to give something back. Please give it some scrutiny and use some common sense.... Questions? Comments?? Author is Ken Gunderson and can be reached via kgunders at don't spam me unless you want my mail server to blacklist you forever teamcool.net. Happy Typo'ing on FreeBSD. Now I really must get some sleeep...;-)
Okay, had a couple requests for some benchmarks so here's some quick and dirty ab's. Apache2 is straight out of the ports collection and no effort whatsoever invested in tuning and tweaking for performance. Typo version is also pre new and improved and way cool admin interface. Lighty is configured to spawn a dozen FastCGI procs. Machine hardware:
dual AMD Operon 246 4GB DDR400 ECC Registered Memory
System: 5.4-RELEASE-p5 FreeBSD amd64 (could probably increase perf by running in 32 bit mode).
ruby-1.8.2_4 An object-oriented interpreted scripting language ruby18-bdb1-0.2.2 Ruby interface to Berkeley DB revision 1.8x with full featu ruby18-fcgi-0.8.6 FastCGI library for Ruby ruby18-gems-0.8.11 Package management framework for the Ruby language ruby18-iconv-1.8.2 An iconv wrapper class for Ruby mysql-client-4.1.13 Multithreaded SQL database (client) mysql-server-4.1.13 Multithreaded SQL database (server) apache-2.0.54_2 Version 2 of Apache web server with prefork MPM.
1. Start out w/concurrency of 1:
ab -n 10000 -c 1 http://192.168.1.177:80/
Server Software: lighttpd/1.3.15
Server Hostname: 192.168.1.177
Server Port: 80
Document Path: /
Document Length: 2822 bytes
Concurrency Level: 1
Time taken for tests: 1216.168115 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 30380000 bytes
HTML transferred: 28220000 bytes
Requests per second: 8.22 [#/sec] (mean)
Time per request: 121.617 [ms] (mean)
Time per request: 121.617 [ms] (mean, across all concurrent requests)
Transfer rate: 24.39 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 4
Processing: 18 120 14.2 118 235
Waiting: 17 120 14.0 117 234
Total: 18 120 14.2 118 235
Percentage of the requests served within a certain time (ms)
50% 118
66% 118
75% 118
80% 118
90% 118
95% 172
98% 175
99% 176
100% 235 (longest request)
Now let's jack concurency up a bit....
$ ab -n 10000 -c 10 http://192.168.1.177:80/
Concurrency Level: 10
Time taken for tests: 146.104187 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 30380000 bytes
HTML transferred: 28220000 bytes
Requests per second: 68.44 [#/sec] (mean)
Time per request: 146.104 [ms] (mean)
Time per request: 14.610 [ms] (mean, across all concurrent requests)
Transfer rate: 203.05 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 0.1 0 2
Processing: 18 145 50.9 126 601
Waiting: 18 143 47.5 125 601
Total: 18 145 50.9 126 601
Percentage of the requests served within a certain time (ms)
50% 126
66% 141
75% 157
80% 169
90% 204
95% 237
98% 293
99% 352
100% 601 (longest request)
And some more...
$ ab -n 10000 -c 100 http://192.168.1.177:80/
Concurrency Level: 100
Time taken for tests: 129.502056 seconds
Complete requests: 10000
Failed requests: 0
Write errors: 0
Total transferred: 30383038 bytes
HTML transferred: 28222822 bytes
Requests per second: 77.22 [#/sec] (mean)
Time per request: 1295.021 [ms] (mean)
Time per request: 12.950 [ms] (mean, across all concurrent requests)
Transfer rate: 229.11 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 0 0 1.4 0 18
Processing: 52 1286 205.9 1275 2403
Waiting: 51 1285 205.5 1274 2402
Total: 69 1286 205.5 1275 2403
Percentage of the requests served within a certain time (ms)
50% 1275
66% 1342
75% 1390
80% 1424
90% 1536
95% 1645
98% 1777
99% 1854
100% 2403 (longest request)
For sake of comparison, on a more modest legacy machine, PIII-700 w/1GB Ram, FBSD-5.4-p5 i386, and max-proc=4:
$ ab -n 1000 -c 1000 http://typo.mydom.tld/
Document Path: /
Document Length: 7951 bytes
Concurrency Level: 1000
Time taken for tests: 7.122140 seconds
Complete requests: 1000
Failed requests: 0
Write errors: 0
Total transferred: 8750272 bytes
HTML transferred: 8493032 bytes
Requests per second: 140.41 [#/sec] (mean)
Time per request: 7122.140 [ms] (mean)
Time per request: 7.122 [ms] (mean, across all concurrent requests)
Transfer rate: 1199.78 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 2 434 1091.0 2 6205
Processing: 133 1036 295.6 1034 2152
Waiting: 130 788 209.6 805 1381
Total: 287 1471 1126.9 1108 7076
Percentage of the requests served within a certain time (ms)
50% 1108
66% 1288
75% 1378
80% 1451
90% 3872
95% 4146
98% 4394
99% 4517
100% 7076 (longest request)
Hmmm.... 140 requests/sec from 4 FastCGI procs doesn't look too shabby to me, eh? But then what do I know....;-P
Am I reading this wrong, or does the PIII look to be much faster than the amd 246?
I guess you'd need to have -c 1000 on the amd to get a more direct comparison.
Response from Ken on 11/25/2005-- Yes, the lowly PIII 700 aoutperformed the dual opteron in these tests. Obviously the Opteron machine is going to scale far beyond the PIII 700. I'm not sure about they precise reasons but I've heard some discussion that the 32 bit code has been highly optimized over time compared to the 64 bit stuff. Don't quote me on it though. The 64 bit stuff really comes into it's own when you need more tha 4 GB of ram. Hence they absolutely rock as database and application servers.
Added by gjw:
on fbsd6, minor additions.. in httpd.conf, also make sure that mod_proxy,
mod_proxy_connect, and mod_proxy_http are uncommented in the loadmodule section, and at the very end of the file (beginning of the VirtualHost settings), uncomment NameVirtualHost *:80 and make sure you have an initial virtual host set up to take all other requests (see http://httpd.apache.org/docs/2.0/vhosts/name-based.html)... unless you're doing IPbased vhosting, in which case, see same document.
Response from Ken on 11/25/2005-- Yes, that goes w/o saying... I was making assumption that anyone doing vhosting had the Apache basics. Correct me if I'm wrong but I don't think you need mod_proxy_connect though unless you're proxying ssl connects.
wac 12/2/2005-- I wrote up instructions for running Typo (or any other Rails app) with Apache httpd with MPM worker and FastCGI. Performance has been really good. http://www.carrel.org/articles/2005/11/21/rails-with-apache-mpm-worker
1. Install Ruby One Click installer. Using 1.8.2-15 Windows.
1. Unpack Typo anywhere. Using typo-2.6.0.zip.
example F:\appn\typo
1. Install PostgreSQL. Using 8.1.2 Windows.
example F:\app\PostgreSQL\8.1\bin
1. Open a Command window (Windows key R cmd enter)
1. gem update
1. gem install rails --include-dependencies *--version '1.0.0*' (Typo-2.6.0 is