ãã¼ã£ã¨æ°ã«ãªã£ã¦ãããã©ãæ¾ç½®ãã£ã±ãªãã§ãã£ã
.com ãã¡ã¤ã³ãã¨ãã¿ã¤ãã³ã°ã§ä½ãå¤ãããã¨èãã¦ããã®ã ãã©ãçªçºçã«ãµã¼ããæ»ãã ãã¨ããã£ã¦ããããã«ãªã£ã¦ããã®ãã¤ãã«ãªãã¥ã¼ã¢ã«ãããã
æ°çºè¦
"/" ã sinatra ã¢ããªã§åããããã«ããããã«ã¯ã©ããããåé¡
ããã¯ãããæå³ãã£ã¨ãããã¥ã©ã¼ãªåé¡ã ã¨æãã®ã§ãããã¼ãã¯åãã¦ã ã£ãã®ã§ã¡ãã£ã¨ããããããã
ãã£ã¦ã¿ãã°ãªãã®ãã¨ã¯ãªãã¦ãdocumentroot ã public ã«ããã°è¯ãã ãã§ããã
ä»ã®ãµã¼ã㯠nginx ã§åãã¦ããã®ã§ã以ä¸ã®ãããªå¤ã«
location / {
# /path/to ã® /to ã«ã¯ sinatra ãåããä¸å¼ã®ãã¡ã¤ã«ãããã¨æã£ã¦ã
root /path/to/public;
}
ããã SubURI ã§åãã¦ãä»ã® sinatra ã¢ããªã¯ã©ããªã£ã¡ããã®åé¡
å®ã¯ãã®åé¡ãããä¸çªã®æ¸å¿µç¹ã ã£ãã®ã§ããããã£ã¦ã¿ããåå¤ãããªãã¨è§£æ±ºãã¾ããã
ãããªæãã§ãhttpd ã®è¨å®ã¯å¤æ´ãªãã
location / {
# /path/to ã® /to ã«ã¯ sinatra ãåããä¸å¼ã®ãã¡ã¤ã«ãããã¨æã£ã¦ã
root /path/to/public;
passenger_enabled on;
passenger_base_uri /sinatra_app;
}
ã§ãsinatra ã¢ããªã® public ã¸ãªã³ã¯ãããã·ã³ããªãã¯ãªã³ã¯ãä¸è¨ /path/to/public ã«ããã¦ãããã°è¯ãã®ã§ããã
ããã ãã§è§£æ±ºï¼å®å¿ããï¼
TODO
ãããã google Analytics 移æ¤ããã®ãããã¦ã
*1: :layout ã®ã¢ã¬