Note that there are some explanatory texts on larger screens.

plurals
  1. PODeploying RoR app with Passenger: Apache shows files only from public folder
    primarykey
    data
    text
    <p>I am a newbie in both Rails and Apache stuff. I followed tutorials to create new rails app, and tried to deploy it using Passenger. </p> <p>I generated a scaffold, created+migrated database and, and it is already working on localhost:3000.</p> <p>I installed apache2 and passenger, enabled mod passenger, and I can see the usual "Welcome aboard/You’re riding Ruby on Rails!" page on localhost:80 also. But I can't reach the localhost/posts page, while I can reach localhost:3000/posts. (I see "500 Internal Server Error" page, not one of the 404/422/500 pages in the public folder). I also don't see the rails image on the index page (assets/rails.png) on port #80 -everything is OK on port #3000.</p> <p>I added RackEnv developer and RailsEnv developer to the virtual host file. Apache gives no error output on screen when I restart it -It reasonably gives error when I say a2dismod passenger: "Invalid command 'RackEnv'". So I assume passenger is working.</p> <p>I believe somehow apache is not reading the folders except for the public folder, I tried playing around with the permissions and ownerships with no success.</p> <p>Anybody has a clue?</p> <p>Thanks</p> <p>EDIT: I did</p> <p>rake db:create RAILS_ENV=production rake db:migrate:reset RAILS_ENV=production</p> <p>and the deleted the RackEnv/RailsEnv lines from the vhost file, and restarted apache. Now I see public/500.html on localhost/posts. it is still working on localhost:3000/posts</p> <p>Logs: rails log file contains only</p> <p>Migrating to CreateDenemes (20120316021657)</p> <p>apache error log</p> <p>[Thu Mar 15 22:22:03 2012] [notice] Digest: generating secret for digest authentication ... [Thu Mar 15 22:22:03 2012] [notice] Digest: done [Thu Mar 15 22:22:04 2012] [notice] Apache/2.2.20 (Ubuntu) DAV/2 Phusion_Passenger/3.0.11 mod_ssl/2.2.20 OpenSSL/1.0.0e configured -- resuming normal operation s</p> <p>and other_vhosts...log is empty</p> <p>V host file:</p> <p>VirtualHost *:80</p> <pre><code> ServerName sencer DocumentRoot /home/sselcuk/sencer/public Directory /home/sselcuk/sencer/public AllowOverride all Options -MultiViews /Directory </code></pre> <p>/VirtualHost</p>
    singulars
    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.
 

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