nginx - èµ·åã¾ã§
nginx ãã¡ããã£ã¨ä½¿ã£ã¦ã¿ãã®ã§ã¡ã¢ã
æè¿ã® Rails çéã£ã¦ã©ããªã£ã¦ããã§ãããããPassenger (mod_rails) 㧠FA?
åå¼·ä¼ãåºã¦ãªãã weblog ãè¦ã¦ãªããã§æ
å ±ã®å¤å³¶ç¶æ
ããè¯ããªãããã¨ç¥ãã¤ã¤ä½æ
ãè
°ãéãã
Identity Con ã¯è¡ãããã£ããã©é±ä¸ãã調åå´©ãã¦ç¾å¨é«ç±ãã¦ã³ä¸ã§ãã
ã¾ã¨ã
ã·ã³ã¿ãã¯ã¹ãã§ãã¯
nginx -t -c /opt/local/etc/nginx/nginx.conf
launchctl ã«ããèµ·åãåãã¼ããåæ¢
launchctl load /Library/LaunchDaemons/org.macports.nginx.plist launchctl stop org.macports.nginx launchctl unload /Library/LaunchDaemons/org.macports.nginx.plist
ãã£ã¨ããããæ¹ããåç¥ã®æ¹ã¯æãã¦ãã ããã»ã»
log
macports ããã¤ã³ã¹ãã¼ã«ããããã¨æããLaunchDaemon ã«ç»é²ãããã®ã§ãããªãã ããã
sudo launchctl list | grep nginx ã§ç¢ºèªããã
61 - 0x10b5d0.nginx 60 - 0x10b400.nginx 45 - org.macports.nginx
http://wiki.codemongers.com/NginxFullExample ãããæå°è¨å®ã§åããã¦ã¿ãã
nginx.conf
events { worker_connections 1024; } http { server { listen 4000; server_name localhost; root /var/www/htdocs; index index.html; } }
ãã¹ãã¨èµ·å
sudo nginx -t -c /opt/local/etc/nginx/nginx.conf sudo nginx -c /opt/local/etc/nginx/nginx.conf
http://localhost:4000/ ã«ã¢ã¯ã»ã¹ãã¦èµ·åã確èªããkã
LaunchDaemon ã§ä½¿ã£ã¦ã¿ãã
sudo launchctl unload /Library/LaunchDaemons/org.macports.nginx.plist
ã§æ»äº¡ç¢ºèªãã¦ããã
sudo launchctl load /Library/LaunchDaemons/org.macports.nginx.plist
RunAtLoad No ã®ã¯ã»ã«ä½æ
ããã®æç¹ã§èµ·åãã¦ããã»ã»
start/stop ãå¹ããªãã unload ããã¨æ¢ã¾ã£ã¦ãããã
試ãã« listen 4010 ã«æ¸ãæã㦠launchctl stop ããã¨è¨å®ããªãã¼ããã¦ããã
ã©ããã launchctl stop 㯠-HUP ãé£ã°ãã¦ãããããã
ç ãã®ã§ç¶ãã¯ã¾ãä»åº¦ãç±ã§ä½åã²ã¼ã¸ãããããæ¸ãæ¸ãã