{"id":6237,"date":"2011-10-11T02:10:33","date_gmt":"2011-10-10T17:10:33","guid":{"rendered":"http:\/\/fukata.org\/?p=6237"},"modified":"2017-08-11T22:58:48","modified_gmt":"2017-08-11T22:58:48","slug":"run-nodejs-sub-directory-on-apache","status":"publish","type":"post","link":"https:\/\/blog.fukata.org\/archives\/6237\/","title":{"rendered":"NodeJS\u3092\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u52d5\u304b\u3059\u70ba\u306eApache\u306e\u8a2d\u5b9a"},"content":{"rendered":"

\u305d\u308d\u305d\u308dnginx\u306b\u79fb\u884c\u3057\u3088\u3046\u304b\u306a\u3068\u3082\u601d\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u73fe\u72b6\u3001Apache\u4e0a\u3067\u52d5\u304b\u3057\u3066\u3044\u305f\u305f\u3081\u3001Apache\u3067\u306eNodeJS\u306e\u30d7\u30ed\u30ad\u30b7\u8a2d\u5b9a\u3067\u3059\u3002<\/p>\n

Apache\u306e\u8a2d\u5b9a\u306f\u3001\u6700\u521d\u306b\u8a2d\u5b9a\u3057\u3066\u305d\u308c\u3063\u304d\u308a\u3067\u6b21\u306b\u8a2d\u5b9a\u3059\u308b\u6642\u306b\u899a\u3048\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u30e1\u30e2\u3068\u3057\u3066\u6b8b\u3057\u3066\u304a\u304d\u307e\u3059\u3002<\/p>\n

\u5225\u306bNodeJS\u306b\u9650\u3063\u305f\u8a71\u3067\u306f\u306a\u304f\u3001\u4ed6\u306e\u4f3c\u305f\u3088\u3046\u306a\u30e2\u30ce\u306b\u3082\u9069\u7528\u3067\u304d\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n

ProxyPass, ProxyPassReverse\u306e\u307f\u3060\u3068\u3001NodeJS\u5185\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u306a\u3069\u304c\u305d\u306e\u307e\u307e\u8868\u793a\u3055\u308c\u3066\u3057\u307e\u3044\u3001\u6b63\u5e38\u306b\u52d5\u4f5c\u3057\u306a\u3044\u306e\u3067\u3001SetOutputFilter\u3068ProxyHTMLURLMap\u3092\u8a2d\u5b9a\u3057\u3001\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\u30eb\u30fc\u30c8\u4ee5\u4e0b\u306e\u30ea\u30f3\u30af\u306b\u6307\u5b9a\u3057\u305f\u30b5\u30d6\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u8ffd\u52a0\u3059\u308b\u3088\u3046\u306b\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n

\r\n<VirtualHost *:80>\r\n  ... \u305d\u306e\u4ed6\u8a2d\u5b9a ...\r\n \r\n  ProxyPass \/hoge https:\/\/localhost:3000\r\n  ProxyPassReverse \/hoge https:\/\/localhost:3000\r\n  <Location \/hoge>\r\n    SetOutputFilter proxy-html\r\n    ProxyHTMLURLMap \/ \/hoge\/\r\n  <\/Location>\r\n \r\n  ... \u305d\u306e\u4ed6\u8a2d\u5b9a ...\r\n<\/VirtualHost>\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"

\u305d\u308d\u305d\u308dnginx\u306b\u79fb\u884c\u3057\u3088\u3046\u304b\u306a\u3068\u3082\u601d\u3063\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u73fe\u72b6\u3001Apache\u4e0a\u3067\u52d5\u304b\u3057\u3066\u3044\u305f\u305f\u3081\u3001Apache\u3067\u306eNodeJS\u306e\u30d7\u30ed\u30ad\u30b7\u8a2d\u5b9a\u3067\u3059\u3002 Apache\u306e\u8a2d\u5b9a\u306f\u3001\u6700\u521d\u306b\u8a2d\u5b9a\u3057\u3066\u305d\u308c\u3063\u304d\u308a\u3067\u6b21\u306b … \u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":2,"featured_media":9223372036854775807,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1980],"tags":[913],"_links":{"self":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/6237"}],"collection":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/comments?post=6237"}],"version-history":[{"count":0,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/posts\/6237\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media\/9223372036854775807"}],"wp:attachment":[{"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/media?parent=6237"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/categories?post=6237"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.fukata.org\/wp-json\/wp\/v2\/tags?post=6237"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}