How to configure HTTPD for Capistrano

时间:2018-06-19 11:08:54

标签: ruby-on-rails capistrano httpd.conf

I am trying to deploy Ruby on Rails production sever using Capistrano. But I am not able to run it on any port

The httpd.conf has following configuration

<VirtualHost *:80>
  ServerAdmin webmaster@dummy-host.example.com
  DocumentRoot /var/www/server/public
  ServerName ruby-project.com
  RewriteEngine On
  RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
  RewriteRule ^/(.*)$ http://127.0.0.1:3000%{REQUEST_URI} [P]

  LogLevel warn
  CustomLog /var/log/httpd/ruby-project.com.access.log combined
  ErrorLog /var/log/httpd/ruby-project.com.error.log

  <Directory /var/www/server/public>
     Satisfy any
     Allow from all
     Require all granted
     Options -MultiViews
  </Directory>
  <Location ^/assets/.*$>
     # Use of ETag is discouraged when Last-Modified is present
     Header unset ETag
     FileETag None
     # RFC says only cache for 1 year
     ExpiresActive On
     ExpiresDefault "access plus 1 year"
  </Location>
</VirtualHost>

0 个答案:

没有答案