我正在为我的Rails应用程序在生产中使用 puma 服务器。我正在使用 Apache 服务器。当前的Apache配置是
<VirtualHost *:80>
RewriteEngine On
RewriteCond %{HTTP:X-Forwarded-Proto} =http
RewriteRule .* https://%{HTTP:Host}%{REQUEST_URI} [L,R=permanent]
DocumentRoot /var/www/html/public
RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ http://127.0.0.1:3000%{REQUEST_URI} [P]
LogLevel warn
CustomLog /var/log/httpd/rails.access.log combined
ErrorLog /var/log/httpd/rails.error.log
<Directory /var/www/html/public>
Satisfy any
Allow from all
Require all granted
Options -MultiViews
</Directory>
<Location ^/assets/.*$>
Header unset ETag
FileETag None
ExpiresActive On
ExpiresDefault "access plus 1 year"
</Location>
</VirtualHost>
我已经使用了命令
RAILS_ENV=production puma -p 3000 --daemon
但是,当使用 capistrano 时,它与套接字文件一起运行,而不在任何端口上。如何在Apache中配置它?