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
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
Following are my instructions to install the production server
install ubuntu server
echo “alias ll=‘ls -l’” >> ~/.bash_aliases
edit .bashrc and uncomment the loading of .bash_aliases
sudo apt-get update
sudo apt-get upgrade
sudo dpkg-reconfigure tzdata
sudo apt-get install ntp
sudo ntpdate ntp.ubuntu.com # Update time
sudo hostname your-hostname
Add 127.0.0.1 your-hostname
sudo vim /etc/hosts
Write your-hostname in
sudo vim /etc/hostname
sudo apt-get install mysql-server libmysqlclient15-dev
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.