У меня есть два проекта Rails с другой версией ruby и rails,
Я использую сервер Nginx для запуска этих проектов в рабочем состоянии.
Я использую Rvm для поддержки различных версий ruby / rails.
Мой файл nginx.conf выглядит так:
server {
listen 80;
listen [::]:80 ipv6only=on;
server_name ec2-34-222-63-71.us-west-2.compute.amazonaws.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root /home/ec2-user/apps/tukatech_garmentstore_live/public;
# Turn on Passenger
rails_env production;
passenger_enabled on;
passenger_ruby /home/ec2-user/.rvm/gems/ruby-2.3.8@5.0.2/wrappers/ruby;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ /.well-known {
allow all;
}
}
Для 2-го проекта:
server {
listen 3000;
listen [::]:3000 ipv6only=on;
server_name ec2-34-222-63-71.us-west-2.compute.amazonaws.com;
# Tell Nginx and Passenger where your app's 'public' directory is
root /home/ec2-user/apps/tukaweb/public;
# Turn on Passenger
rails_env production;
passenger_enabled on;
passenger_ruby /home/ec2-user/.rvm/gems/ruby-2.4.0@rails5.1.2/bin/rails;
# redirect server error pages to the static page /50x.html
error_page 500 502 503 504 /50x.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ /.well-known {
allow all;
}
}
и когда я получаю файл error.log изNginx.
- /home/ec2-user/.rvm/gems/ruby-2.3.8/gems/passenger-6.0.0 is not secure: it can be modified by user ec2-user
- /home/ec2-user/.rvm/gems/ruby-2.3.8/gems is not secure: it can be modified by user ec2-user
- /home/ec2-user/.rvm/gems/ruby-2.3.8 is not secure: it can be modified by user ec2-user
- /home/ec2-user/.rvm/gems is not secure: it can be modified by user ec2-user
- /home/ec2-user/.rvm is not secure: it can be modified by user ec2-user
- /home/ec2-user is not secure: it can be modified by user ec2-user
Пожалуйста, исправьте то, что я делаю, что-то не так в конфигурации.Заранее спасибо