ãããã¼å¤§ã¾ãã ãã©ãDirectoryã¯ãã£ã¬ã¯ããªåãLocationã¯URLåã«é¢ããè¨å®ãåºæ¬çã«åãããã ããAllowOverRideãªã©ã®ããã«ãDirectoryã§ãã使ããªãè¨å®ããã*1ã
Directory
æå®ã®ãã¡ã¤ã«ã·ã¹ãã ã®ãã£ã¬ã¯ããªã¨ãµããã£ã¬ã¯ããªã¨ã®ã¿ã« é©ç¨ããããã£ã¬ã¯ãã£ããå²ã
DirectoryMatchã ã¨pathåã«æ£è¦è¡¨ç¾ã使ããã
<Directory /hoge/fuga>
ã¨ããã¨/hoge/fugaãã£ã¬ã¯ããªã«å¯¾ãã¦ã®è¨å®ã«ãªããé ã®/ããªãã£ããDocumentRootããã®ç¸å¯¾ãã¹ã
Location
å²ãã ãã£ã¬ã¯ãã£ããããããã URL ã®ã¿ã«é©ç¨
LocationMatchã ã¨URLãæ£è¦è¡¨ç¾ã§è¡¨ããã
<Location /hogehoge >
ã¨æå®ããã¨ããªã¯ã¨ã¹ãã®URLãhttp://servername/hogehoge ã«å¯¾ãã¦ã®è¨å®ã«ãªãã
Locationã使ãã¨ã
ãã£ã¬ã¯ãã£ã㯠ãã¡ã¤ã«ã·ã¹ãã å¤ã®ã³ã³ãã³ãã«ãã£ã¬ã¯ãã£ããé©ç¨ããã¨ã㫠使ç¨ãã¦ãã ããããã¡ã¤ã«ã·ã¹ãã ã«åå¨ããã³ã³ãã³ãã«å¯¾ãã¦ã¯ã 㨠ã使ã£ã¦ãã ããã ä¾å¤ã¯ã ã§ãããã¯ãµã¼ãå ¨ä½ã«å¯¾ã㦠è¨å®ãé©ç¨ããç°¡åãªæ¹æ³ã§ãã
ãã¡ã¤ã«ã·ã¹ãã å¤ã®ã³ã³ãã³ãã¨ã¯
æåãªã®ã¯server-statusã
<Location /server-status> SetHandler server-status Order deny,allow Deny from all Allow from 192.168.0.1 </Location>
ä»ã«ã¯mod_proxyã§ç¹å®URLãã¢ããªã±ã¼ã·ã§ã³ãµã¼ãã«é£ã°ãã¨ãã¨ãããªã
<Location /app > ProxyPass http://app.example.com/app keepalive=off loadfactor=10 </Location>
*1:AllowOverRideãLocationã§ä½¿ããªãã®ã¯apache2ã®ã¿ï¼