Passenger is listing all files instead of running

2019-08-18 08:01发布

问题:

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 joe@joe.com
     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 jom@jom.com
   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>

回答1:

It doesn't work in this way. The ServerName must be a hostname.

You must set ServerName transprintusa.com, then use the Location or Directory directive to enable passenger when the request matches given location.

See Deploying to a sub URI from the Passenger documentation.