1
Apache一直在头文件中使用内容类型为'text/plain'的Rails文件。我安装了mod_mime,包含所有正确的MIME分配的mime.types文件,以及我的配置中的以下代码。有什么想法吗?Apache为Rails文件提供了错误的Content-Type
DefaultType text/plain
<IfModule mime_module>
TypesConfig /etc/apache2/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
不知道,如果是相关的,但这里是我的档案网站可用文件夹:
<VirtualHost *:80>
ServerName app.com
ServerAlias www.app.com
DocumentRoot /home/demo/public_html/app/public
RewriteEngine On
<Proxy balancer://mongrel1>
BalancerMember http://127.0.0.1:5000
BalancerMember http://127.0.0.1:5001
BalancerMember http://127.0.0.1:5002
</Proxy>
# Redirect all non-static requests to thin
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ balancer://mongrel1%{REQUEST_URI} [P,QSA,L]
ProxyPass/balancer://mongrel1/
ProxyPassReverse/balancer://mongrel1/
ProxyPreserveHost on
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
# Custom log file locations
ErrorLog /home/demo/public_html/app/log/error.log
CustomLog /home/demo/public_html/app/log/access.log combined
</VirtualHost>
编辑:我刚刚创建从头另一个Rails应用程序,并且默认Rails的“欢迎登机“页面似乎正确显示。我猜这意味着什么是搞砸了与我的其他导轨安装...
哪个轨文件变化
正在服务?那些在你的公共文件夹? – 2010-06-16 14:51:36
是的,DocumentRoot被设置为/ home/demo/public_html/app/public – NudeCanalTroll 2010-06-16 15:01:01