1
아파치는 헤더에 Content-Type이 'text/plain'인 레일스 파일을 계속 제공합니다. mod_mime이 설치되어 있고 mime.types 파일에 올바른 MIME 할당이 모두 있으며 다음 코드가 있습니다. 이견있는 사람?아파치가 잘못된 레일스 용 Content-Type 파일을 제공합니다.
<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>
편집 : 난 그냥 처음부터 다른 레일 응용 프로그램을 생성하고, 기본 레일은 "배를 타고 오신 것을 환영는 관련이 있지만, 여기 내에서 파일 사이트 이용 가능한 폴더의 경우
DefaultType text/plain
<IfModule mime_module>
TypesConfig /etc/apache2/mime.types
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
</IfModule>
확실하지 않음 "페이지가 올바르게 표시되고있는 것 같습니다. 내가
에 변화
했다 봉사하고 있습니까? 공용 폴더에있는 파일들? –
예, DocumentRoot가/home/demo/public_html/app/public으로 설정되어 있습니다. – NudeCanalTroll