Note that there are some explanatory texts on larger screens.

plurals
  1. POAdding ssl to apache virtual host causes rails authlogic to throw a database exception
    primarykey
    data
    text
    <p>I'm working on a rails application. We are using Ruby 1.9.3p0 and Rails 3.1.3 on an Ubuntu server with apache and phusion passenger installed. Our app uses authlogic for authentication and an sqlite database. I'm trying to add ssl support. </p> <p>I modified my apache virtual host file so ssl is enabled. I then browsed to the app over http and https. They both worked. I then added a redirect to my virtual host so all traffic sent over http is redirected to https. Now when I access my app, I get the following phusion error:</p> <p>Error message: You must establish a database connection before using acts_as_authentic</p> <p>I can't figure out what's causing the error. Here's my apache configuration file with sensitive data changed:</p> <pre><code>&lt;VirtualHost *:443&gt; ServerAdmin my.email@example.com ServerName my.domain.com SSLEngine on SSLCertificateFile /path/to/certificatefile SSLCertificateKeyFile /path/to/key/file SSLProtocol all SSLCipherSuite HIGH:MEDIUM DocumentRoot /path/to/document/root RailsEnv production &lt;Directory /path/to/document/root&gt; Options Indexes FollowSymLinks MultiViews ExecCGI AllowOverride All Order allow,deny allow from all AddHandler cgi-script .cgi &lt;/Directory&gt; # Possible values include: debug, info, notice, warn, error, crit, # alert, emerg. LogLevel warn CustomLog /var/log/access.log combined ErrorLog /var/log/error.log &lt;/VirtualHost&gt; &lt;VirtualHost *:80&gt; ServerAdmin my.email@example.com ServerName my.domain.com RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} &lt;/VirtualHost&gt; </code></pre> <p>Thanks!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload