28 avril 2013
Mac OS X Personal Web Server
Mac OS X has an Apache web server built-in. To turn it on, simply go to system preferences and select "Sharing".
If you are not signed in as an administrator everything is grayed out. You will need to press the lock in the left-hand corner and enter the administrator password,
Check the "Web Sharing" box and your Apache server will be up and running within a few seconds.
The root of your personal website (http://localhost/~YOURNAME) is now in
/Users/YOURNAME/Sites/
Additional paths:
- /Library/WebServer/Documents/ is analogous to /var/www/ in Linux
- /Library/WebServer/CGI-Executables/ is analogous to cgi-bin. References to cgi-bin will point to that directory.
- The Apache config file is /etc/apache2/httpd.conf (/etc/httpd/httpd.conf on older versions)
--
最近剛好換Server想幫只有動態IP的電腦裝個新的動態DNS(Dynamic DNS) Client來連線使用.
apt serarch一下跑一堆perl的package出來… 開機跑這個略嫌重口味了點.
後來找到一套binrary 只有28k的inadyn
# apt-get install inadyn # cp /usr/share/doc/inadyn/examples/inadyn.conf /etc # vim inadyn.conf
刪除掉example 1 # 1. #Some comment about inadyn cfg file #--username test --password test --update_period 60000 # --alias test.homeip.net --alias my.second.domain 修改 example2: --username yendewei # user --password password update_period 60000 # some other param without '--' alias hods.dyndns.org --background --syslog
修改 /etc/rc.local 將下行加到 #!/bin/sh -e 以下, exit 0以上的位址
/usr/sbin/inadyn
之後開機就會自動執行了。
第一次用手動執行 # /usr/sbin/inadyn 檢查看看有沒有更新dyndns的資料,如果沒有就再跑一次 # killall inadyn # /usr/sbin/inadyn
Publicité
Publicité
Commentaires