2012-05-20 2 views
1

여기에 우분투 12에 표준 레일과 레드 매뉴가 설치되어 있습니다. 그리고이 오류가 있습니다 : "/ var/www "는 유효한 Ruby on Rails 응용 프로그램 루트로 보이지 않습니다.유효한 디렉토리가 아닙니다 (그물에 대한 답을 찾지 못했습니다)

<VirtualHost *:80> 
     ServerAdmin [email protected] 

     DocumentRoot /var/www 


<Directory /> 
       Options FollowSymLinks 
       AllowOverride None 
     </Directory> 
     <Directory /var/www/> 
       Options Indexes FollowSymLinks MultiViews 
       AllowOverride None 
       Order allow,deny 
       allow from all 
     </Directory> 

     ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ 
     <Directory "/usr/lib/cgi-bin"> 
       AllowOverride None 
       Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
       Order allow,deny 
       Allow from all 
     </Directory> 

     ErrorLog ${APACHE_LOG_DIR}/error.log 

     # Possible values include: debug, info, notice, warn, error, crit, 
     # alert, emerg. 
     LogLevel warn 

     CustomLog ${APACHE_LOG_DIR}/access.log combined 


    <Directory "/usr/share/doc/"> 
     Options Indexes MultiViews FollowSymLinks 
     AllowOverride None 
     Order deny,allow 
     Deny from all 
     Allow from 127.0.0.0/255.0.0.0 ::1/128 
    </Directory> 

PassengerDefaultUser www-data 
RailsEnv production 
RailsBaseURI /redmine 
<Directory /var/www/redmine/> 

AllowOverride None 
AddHandler fcgid-script .fcgi 
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch 
Order allow,deny 
Allow from all 

PassengerEnabled on 
RailsBaseURI /redmine 
PassengerResolveSymlinksInDocumentRoot on 
</Directory> 


</VirtualHost> 
Include /etc/apache2/mods-available/passenger.conf 

내 passenger.conf :

<IfModule mod_passenger.c> 
    PassengerRoot /usr 
    PassengerRuby /usr/bin/ruby 
    PassengerDefaultUser www-data 
</IfModule> 

여기 http://www.google.fr/search?q=The+directory+%22%2Fvar%2Fwww%22+does+not+appear+to+be+a+valid+Ruby+on+Rails+application+root.+&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:fr:official&client=firefox-a

내 기본 파일입니다

일반적인 오류하지만 그물에 어떤 해결책이 될 것 같다 그리고 난 왜 이해가 안 돼요 ... 감사합니다 Bussiere

답변

5

당신은 어떤 설치 명령은 simlink 만드는 실수를했다

<Directory /var/www/YOUR_APP_NAME/public> 
+0

것을이다 – user462794

1

DocumentRoot (승객 용 레일즈 애플리케이션 용)은 애플리케이션의 public 디렉토리 여야합니다.

+0

네, 그것은 그 덕분 Thaanks – user462794

1

[...] 레일 응용 프로그램

DocumentRoot /var/www/YOUR_APP_NAME/public 

내부 public 디렉토리 그래도 DocumentRoot를 가리켜 야합니다. 오른쪽 SIM 링크를 사용하면 다음과 같습니다.

sudo ln -s /usr/share/redmine /var/www/redmine

가상 호스트는 다음과 같이해야합니다 :

<VirtualHost *:80> 
    ServerName redmine.yourdomain.tld 

    DocumentRoot /var/www/redmine/public 

    PassengerMaxPoolSize 4 
    PassengerDefaultUser www-data 
    RailsEnv production 
    RailsBaseURI/ 

    <Directory /var/www/redmine/public> 
    Options FollowSymLinks 
    AllowOverride None 
    Order allow,deny 
    Allow from all 
    </Directory> 

    LogLevel info 
    ErrorLog /var/log/apache2/redmine-error.log 
    CustomLog /var/log/apache2/redmine-access.log combined 
</VirtualHost> 
관련 문제