few day ago I’ve set up tracks 1.5 on Kubuntu 7.10 (now 8.04) with
- apache-2.2.8
- libapache2-mod-fcgid-2.2-1
- ssl_module
It works fine but I got randomly plaintext content (HTTP 200 ...) instand of the renderd content.
So a look on the debug error log files shows me the followning:
[Mon Apr 28 02:32:55 2008] [info] Subsequent (No.10) HTTPS request received for child 0 (server tracks.localhost.de:443)
[Mon Apr 28 02:33:10 2008] [debug] ssl_engine_io.c(1828): OpenSSL: I/O error, 5 bytes expected to read on BIO#82b1088 [mem: 82c6620]
[Mon Apr 28 02:33:10 2008] [info] [client 127.0.0.1] (70007)The timeout specified has expired: SSL input filter read failed.
[Mon Apr 28 02:33:10 2008] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
[Mon Apr 28 02:33:10 2008] [info] [client 127.0.0.1] Connection closed to child 0 with standard shutdown (server tracks.localhost.de:443)
This is my vhost.conf
4 NameVirtualHost *:80
5 NameVirtualHost *:443
6
7 <VirtualHost *:433>
8 ServerName tracks.localhost.de
9 ServerAdmin nedunk
10 SSLEngine On
11 SSLCertificateFile /etc/apache2/ssl/apache.pem
12
13 DocumentRoot /var/rails/tracks/public/
14 <Directory />
15 Options FollowSymLinks
16 AllowOverride None
17 </Directory>
18
19
20 # Possible values include: debug, info, notice, warn, error, crit,
21 # alert, emerg.
22 LogLevel debug
23
24 ErrorLog /var/log/apache2/tracks-error.log
25 CustomLog /var/log/apache2/tracks-access.log combined
26 ServerSignature On
27
28 DefaultInitEnv RAILS_ENV production
29 <Directory /var/rails/tracks/public/>
30 Options ExecCGI +FollowSymLinks
31 # Options All ExecCGI
32 AllowOverride All
33 Order deny,allow
34 Deny from all
35 Allow from 127.0.0.0/255.0.0.0 ::1/128
36
37
38 </Directory>
39 </VirtualHost>
40
41 <VirtualHost *:80>
42 ServerName tracks.localhost.de
43 ServerAdmin nedunk
44 Redirect permanent / https://localhost/
45 </VirtualHost>
and here my .htaccess
1 # General Apache options
2 # If you're on Debian try the following instead of the fastcgi-script line:
3 AddHandler fcgid-script .fcgi
6 Options +FollowSymLinks +ExecCGI
22 RewriteEngine On
31 RewriteRule ^$ index.html [QSA]
32 RewriteRule ^([^.]+)$ $1.html [QSA]
33 RewriteCond %{REQUEST_FILENAME} !-f
34 RewriteRule ^(.*)$ dispatch.fcgi [QSA,L]
42 ErrorDocument 500 "<h2>Application error</h2>Rails application failed to start properly"
So the errorlog was the following:
[Mon Apr 28 02:32:55 2008] [info] Subsequent (No.10) HTTPS request received for child 0 (server tracks.localhost.de:443)
[Mon Apr 28 02:33:10 2008] [debug] ssl_engine_io.c(1828): OpenSSL: I/O error, 5 bytes expected to read on BIO#82b1088 [mem: 82c6620]
[Mon Apr 28 02:33:10 2008] [info] [client 127.0.0.1] (70007)The timeout specified has expired: SSL input filter read failed.
[Mon Apr 28 02:33:10 2008] [debug] ssl_engine_kernel.c(1770): OpenSSL: Write: SSL negotiation finished successfully
[Mon Apr 28 02:33:10 2008] [info] [client 127.0.0.1] Connection closed to child 0 with standard shutdown (server tracks.localhost.de:443)
After configuring tracks vhost to use port 80 without ssl, all works fine.
I think this is more a apache und mod_ssl problem than a tracks and ruby on rails problem but maybe sombody have a solution to this.
