I try to create a production server and follow the instructions in this document https://github.com/jnstq/rails-nginx-passenger-ubuntu
However, my Rails Application can not work properly, and I get a error message, “We’re sorry, but something went wrong.”.
If I browse my application’s home page, it works.
If I stop nginx server and use WEBrick instead, it works fine.
Following is my /opt/nginx/conf/nginx.conf
http://dl.dropbox.com/u/77217614/Rails%20101%20Install%20Production%20Server%20Question/nginx.conf
I use Virtualbox 4.1.12 to create the production server Host OS is Mac OS X 10.7.3 Guest OS is Ubuntu 8.04 Server http://releases.ubuntu.com/hardy/ubuntu-8.04.4-server-i386.iso
Here is my Virtualbox Image, http://dl.dropbox.com/u/77217614/Rails%20101%20Install%20Production%20Server%20Question/rails_server.ova
username: rubyonrailsserver password: rubyonrailsserver
Following are my instructions to install the production server
01 install ubuntu server
02 echo “alias ll=‘ls -l’” >> ~/.bash_aliases
03 edit .bashrc and uncomment the loading of .bash_aliases
04 sudo apt-get update sudo apt-get upgrade
05 sudo dpkg-reconfigure tzdata
06 sudo apt-get install ntp
07 sudo ntpdate ntp.ubuntu.com # Update time
08 sudo hostname your-hostname
09 Add 127.0.0.1 your-hostname sudo vim /etc/hosts
10 Write your-hostname in sudo vim /etc/hostname
11 sudo apt-get install mysql-server libmysqlclient15-dev
12 Gemrc Add the following lines to ~/.gemrc, this will speed up gem installation and prevent rdoc and ri from being generated, this is not nessesary in the production environment.