1
軌處理子域名我也跟着上multitenant 簡單railscasts插曲現在在我的應用程序的所有住戶進入自己的子域名,其對我的開發系統的研究與開發,但溫家寶在本地工作我盡我的VPS系統在這個同樣的過程,瀏覽器說找不到服務器。如何與麒麟,和nginx的
我連接了域名我的IP,並修改了我的nginx的文件,仍然沒有希望
一旦用戶輸入他的子域,請求沒有得到我的rails應用程序。
任何想法對此或我可能沒有得到正確的。由於
我nginx_unicorn_file
upstream unicorn {
server unix:/tmp/unicorn.<%= application %>.sock fail_timeout=0;
}
server {
listen 80 default deferred;
server_name shopnany.com *.shopnany.com;
root <%= current_path %>/public;
location ^~ /assets/ {
gzip_static on;
expires max;
add_header Cache-Control public;
}
try_files $uri/index.html $uri @unicorn;
location @unicorn {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_redirect off;
proxy_pass http://unicorn;
}
error_page 500 502 503 504 /500.html;
client_max_body_size 4G;
keepalive_timeout 10;
}
經過深入研究,我發現我必須爲c記錄*創建一個通配符,客戶可以在不知道我的情況下創建多個子域,所以我不必爲個人客戶創建c記錄。如果主應用程序找不到子域,則它會處理對主應用程序的請求。很簡單 – Uchenna