用于托管同一域

时间:2018-06-10 14:05:58

标签: ruby-on-rails apache mod-ssl

召唤apache专家寻求帮助。我有两个需要在同一个域下配置的项目,一个https://www.example.com的静态站点和另一个应该可以在https://www.example.com/apps访问的rails应用程序。我尝试过很多配置,但似乎都没有。以下是apache文件的当前配置:

<VirtualHost *:443>
  ServerName www.example.com
  ServerAlias www.example.com

  DocumentRoot /var/www/static/public_html
  <Directory /var/www/static/public_html>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    RewriteEngine On
  </Directory>

  AliasMatch /apps(/.*)? /var/apps/app_name/current/public/$1 
  RailsEnv production  
  <Directory /var/apps/app_name/current/public>
    Options Indexes FollowSymLinks
    AllowOverride All
    Require all granted
    RewriteEngine On
  </Directory>  
</VirtualHost>

请帮忙。

0 个答案:

没有答案