使用passenger和nginx布置rails项目

sudo apt-get install libssl-dev
sudo gem install passenger
sudo passenger-install-nginx-module
sudo vim /opt/nginx/conf/nginx.conf
    server {
        listen 80;
        server_name example.com;
        root /somewhere/my_rails_app/public;
        passenger_enabled on;
        rails_spawn_method smart;
    }
sudo vim /ect/hosts
add: 127.0.0.1 example.com

http://antoniocangiano.com/2009/11/20/setup-ruby-enterprise-edition-nginx-and-passenger-aka-mod_rails-on-ubuntu/

你可能感兴趣的:(nginx,ubuntu,vim,Ruby,Rails)