和朋友一起写了一个工作室的管理系统。然后今天在部署阿里云。部署到最后成这样了...用的是 apache2 加上 Passenger,基本上部署是按照 Agile Web Development with Rails 4 来做的。 这个是我们项目的地址https://github.com/judi0713/cmplanroutes的地址https://github.com/judi0713/cmplan/blob/master/config/routes.rb。
部署过程参考了https://www.digitalocean.com/community/tutorials/how-to-deploy-a-rails-app-with-passenger-and-apache-on-ubuntu-14-04, https://ruby-china.org/topics/26185
我的/etc/apache2/sites-available/cmplan.conf 文件
<VirtualHost *:80>
ServerAdmin localhost
DocumentRoot /rails/cmplan/public/
<Directory /rails/cmplan/public>
AllowOverride all
Options -MultiViews
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
apach2.conf 文件
<Directory />
#Options FollowSymLinks
#AllowOverride None
#Require all denied
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Order deny,allow
Allow from all
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
<Directory /rails/cmplan/public>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted
</Directory>
第一次部署服务器,对很多东西还不了解,寻求一下帮助...