아마도 간단한 조정의 문제이지만 무엇이 잘못되었는지 전혀 모릅니다.
호스트가 Capistrano 3.2.1을 사용하여 배포 된 Rails 애플리케이션의 서버가되기를 원합니다. 이것은 eng-perf라는 이름의 Apache / 2.2.15를 실행하는 Unix 시스템입니다 (회사 내부 시스템이므로 현재는 www.address.com 구문이 없음).
이 가이드를 따랐고 전체 설치 과정이 문제없이 진행되었습니다. 다음과 같이 구성 파일을 편집했습니다.
<VirtualHost *:80>
ServerName eng-perf
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /var/www/eng_performance/current/public/
<Directory /var/www/eng-performance/current/public/>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
</VirtualHost>
이 오류가 발생했습니다.
찾을 수 없음
요청 된 URL /이 서버에서 찾을 수 없습니다.
다음으로, 여기 에 설명 된대로 더미 응용 프로그램을 만들어 가이드를 따르고 구성 파일을 다음과 같이 변경했습니다.
<VirtualHost *:80>
ServerName eng-perf
# !!! Be sure to point DocumentRoot to 'public'!
DocumentRoot /var/www/rack_example/public/
<Directory /var/www/rack_exmaple/public/>
# This relaxes Apache security settings.
AllowOverride all
# MultiViews must be turned off.
Options -MultiViews
# Uncomment this if you're on Apache >= 2.4:
#Require all granted
</Directory>
</VirtualHost>
그 결과 똑같은 찾을 수 없음 오류가 발생했습니다. 그래서 저는 아주 간단한 것을 놓치고있는 것 같아요 ..
또한 아파치 서버를 다시 시작하려고했고 메시지가 표시되었습니다. httpd: Could not reliably determine the server's fully qualified domain name, using the.machine.ip.addr for ServerName
결과적으로 ServerName
필드를이 주소로 변경 했지만 작동하지 않았습니다.
최신 정보:
Rich의 조언에 따라 구성 파일을 업데이트하여 이제이 출력을 얻습니다.
config.ru:2: syntax error, unexpected tIDENTIFIER, expecting =>
... [200, { "Content-Type => "text/html" }, ["hello <b>world</b...
... ^
config.ru:2: syntax error, unexpected tSTRING_BEG, expecting keyword_do or '{' or '('
... { "Content-Type => "text/html" }, ["hello <b>world</b>"]]
... ^
config.ru:2: syntax error, unexpected tIDENTIFIER, expecting keyword_end
...-Type => "text/html" }, ["hello <b>world</b>"]]
... ^
config.ru:2: unterminated regexp meets end of file
config.ru:2: syntax error, unexpected end-of-input, expecting keyword_end
)}.to_app
^ (SyntaxError)
/home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:112:in `eval'
/home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:112:in `preload_app'
/home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:158:in `<module:App>'
/home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:29:in `<module:PhusionPassenger>'
/home/deploy/.rvm/gems/ruby-2.0.0-p481/gems/passenger-4.0.50/helper-scripts/rack-preloader.rb:28:in `<main>'
우리는 다음을 사용합니다.
#etc/apache2/apache2.conf
<VirtualHost *:80>
ServerName eng-perf.com
DocumentRoot /var/www/rack_example/plublic
<Directory /var/www/rack_example/public>
Allow from all
Options -MultiViews
</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>
</VirtualHost>
문제는 도메인을 올바르게 호출하지 않는 데 있다고 생각합니다. 요청시 무엇을 찾고 있는지 혼란 스러울 것입니다.
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다