在生產中部署我的導軌3應用後,我注意到路徑並不總是顯示在瀏覽器窗口中。例如,登錄或my_profile鏈接仍然只會顯示http://my_app.com而不是預期的http://my_app.com/login或http://my_app.com/my_profile。意見確實發生了變化,並且起作用。我還可以看到數據庫被擊中並從日誌中顯示視圖(這導致我相信這不是一個簡單的瀏覽器緩存問題)。然而直接去http://my_app.com/login工作,然而,使用應用程序中的鏈接將我帶到預期的地方,同時顯示登錄網址。我在幾個瀏覽器(firefox,opera和chrome)中嘗試了它,並得到了相同的行爲。該應用程序部署在nginx +乘客和後來的nginx +瘦集羣下。我的問題是,發生了什麼事?它可能是nginx設置或我的生產環境設置?我不知道從哪裏開始。在瀏覽器中未顯示導軌路徑(有時)
Running curl -v my_app。與節目
* About to connect() to my_app.com port 80 (#0)
* Trying xx.xx.xx.xx... connected
* Connected to my_app.com (xx.xx.xx.xx) port 80 (#0)
> GET/HTTP/1.1
> User-Agent: curl/7.21.1 (x86_64-apple-darwin10.4.0) libcurl/7.21.1 OpenSSL/1.0.0a
zlib/1.2.5 libidn/1.19
> Host: my_app.com
> Accept: */*
>
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Set-Cookie: ARPT=PKKIKIS10.0.81.64CKILJ; path=/
< Content-Type: text/html; charset=utf-8
< Status: 200
< X-Powered-By: Phusion Passenger (mod_rails/mod_rack) 2.2.5
< ETag: "fce6dec3543058bec16175466020a906"
< X-Runtime: 7
< Content-Length: 787
< Cache-Control: private, max-age=0, must-revalidate
< Server: nginx/0.7.62 + Phusion Passenger 2.2.4 (mod_rails/mod_rack)
< P3P: CP="IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi HIS OUR IND CNT"
< X-Cache: MISS from server.com
< Via: 1.0 server.com:8080
< Connection: close
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head>
<title>http://my_app.com/</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
<meta name="generator" content="Hover Redirect Service">
</head>
<frameset framespacing="0" rows="100%,*" cols="100%" frameborder="no" border="0">
<frame name="DDIRECTXYZZY2" scrolling="auto" src="http://xxx.xx.xxx.xxx" noresize>
<frame name="DDIRECTXYZZY" scrolling="no" noresize>
<noframes>
<h1><a href="http://xxx.xx.xxx.xxx">http://my_app.com/</a></h1>
<p>Please <a href="http://xxx.xx.xxx.xxx">click here</a> to view the non-framed versi on.</p>
</noframes>
</frameset>
</html>
所以顯然這是一個問題。整個事情都被DNS重定向框起來了?該設置不是Phusion Passenger + nginx。它最初是,但現在它的瘦+ nginx。另外,當直接進入應用程序的IP地址,事情就很好。當我轉到域名時,我會看到框架版本。也只是IP地址標準的外觀(如它的加載整個頁面)的curl -v
響應。
(非)格式的問題在眼睛上太痛苦了。 – Zabba 2010-12-07 08:12:11
`curl -v http:// my_app.com`返回什麼? – DanSingerman 2010-12-07 12:30:17