我在我的 RoR 服务器上创建了一个新项目,我想重定向 apache 以从我的 app/views/home/index.html.erb 中获取新的索引文件,但它似乎不起作用。
这是我创建新索引文件之前的虚拟服务器 conf 文件
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/html/blog/public
ErrorLog logs/example.com-error_log
CustomLog logs/example.com-access_log common
<Directory /var/www/html/blog/public>
Allow from all
PassengerEnabled off
Options +Indexes +FollowSymLinks -MultiViews
</Directory>
</VirtualHost>
在我删除了 public/index.html
<VirtualHost *:80>
ServerName www.example.com
ServerAlias example.com
DocumentRoot /var/www/html/blog/app/views/home/
ErrorLog logs/example.com-error_log
CustomLog logs/example.com-access_log common
<Directory /var/www/html/blog/app/views/home/>
Allow from all
PassengerEnabled off
Options +Indexes +FollowSymLinks -MultiViews
</Directory>
</VirtualHost>