Passenger 列出所有文件而不是运行我的 Rails 应用程序
我正在尝试将 Rails 应用程序添加到另一个应用程序的目录中,但由于某种原因,rails 应用程序未呈现
这是一个 链接到我的应用程序
这是 VHOST
<VirtualHost 184.106.111.142:80>
ServerAdmin [email protected]
ServerName transprintusa.com/design
# ServerAlias
DocumentRoot /srv/www/www.transprintusa.com/design/design.transprintusa.com/current/public
ErrorLog /srv/www/design.transprintusa.com/logs/error.log
RailsEnv production
<Directory "/srv/www/www.transprintusa.com/design/design.transprintusa.com/current/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
,但 Rails 应用程序显示了所有文件。
Passenger 和所有内容都安装在该服务器上,因为 Rails 站点位于 design.transprintusa.com。关于我做错了什么有什么想法吗?
如果我可以提供任何帮助,任何人都可以帮助我
更新 - 这是我的新 VHOST,并且仍然显示 Rails 文件
<VirtualHost 184.106.111.142:80>
ServerAdmin [email protected]
ServerName transprintusa.com
ServerAlias www.transprintusa.com
DocumentRoot /srv/www/www.transprintusa.com/
ErrorLog /srv/www/www.transprintusa.com/logs/error.log
CustomLog /srv/www/www.transprintusa.com/logs/access.log combined
<Directory "/srv/www/www.transprintusa.com/">
AllowOverride all
Options -MultiViews
</Directory>
RailsBaseURI /rails
<Directory /srv/www/www.transprintusa.com/design>
Options -MultiViews
</Directory>
</VirtualHost>
I'm trying to add the Rails application to the a directory of another application and for some reason the rails application is not rendering
Here's a link to my application
Here's VHOST
<VirtualHost 184.106.111.142:80>
ServerAdmin [email protected]
ServerName transprintusa.com/design
# ServerAlias
DocumentRoot /srv/www/www.transprintusa.com/design/design.transprintusa.com/current/public
ErrorLog /srv/www/design.transprintusa.com/logs/error.log
RailsEnv production
<Directory "/srv/www/www.transprintusa.com/design/design.transprintusa.com/current/public">
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
but the Rails application is showing all the files.
Passenger and everything is installed on this server because the Rails site was at design.transprintusa.com. Any ideas on what I'm doing wrong?
If there is anything I can give to help anyone help me
UPDATE - Here is my new VHOST and still displays the rails files
<VirtualHost 184.106.111.142:80>
ServerAdmin [email protected]
ServerName transprintusa.com
ServerAlias www.transprintusa.com
DocumentRoot /srv/www/www.transprintusa.com/
ErrorLog /srv/www/www.transprintusa.com/logs/error.log
CustomLog /srv/www/www.transprintusa.com/logs/access.log combined
<Directory "/srv/www/www.transprintusa.com/">
AllowOverride all
Options -MultiViews
</Directory>
RailsBaseURI /rails
<Directory /srv/www/www.transprintusa.com/design>
Options -MultiViews
</Directory>
</VirtualHost>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这是行不通的。
ServerName
必须是主机名 。您必须设置
ServerName transprintusa.com
,然后使用Location
或Directory
指令在请求与给定位置匹配时启用乘客。请参阅 Passenger 文档中的部署到子 URI。
It doesn't work in this way. The
ServerName
must be a hostname.You must set
ServerName transprintusa.com
, then use theLocation
orDirectory
directive to enable passenger when the request matches given location.See Deploying to a sub URI from the Passenger documentation.