How to use different rails_env with nginx, passenger and redmine

前端 未结 2 1756
忘掉有多难
忘掉有多难 2020-12-21 06:27

I need to have redmine running in combination with nginx, phusion passenger and mysql. Because of the project requires several instances of redmine, which should be realized

2条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-21 07:04

    nginx passenger doesnt follow symlink of .../app/public directory many time because it expect it to be a directory not file
    However you can use PASSENGER_APP_GROUP_NAME directive.
    like this:-

    server {
    listen xxxx;
    server_name redmine.xxxxx;
    root /xxxxx/redmine/public;
    passenger_enabled on;
    rails_env production;
    passenger_app_group_name devlopment;
     }
    
     server {
    listen xxxx;
    server_name redmine.xxxxx;
    root /xxxxx/redmine/public;
    passenger_enabled on;
    rails_env production;
    passenger_app_group_name production
    }
    

提交回复
热议问题