Apache Virtural Host with dynamic ip address

1. Configure your apache reading the httpd.conf with external file.
Append these line into /etc/httpd/conf/httpd.conf
include /etc/httpd/conf/virtualhost
include /etc/httpd/conf/mydomainhost

2. Configure the update script running with cron
Put a script into /etc/cron.daily/rc.updatehttpd

###############################################
#!/bin/sh
HTTPADDR=”`ifconfig ppp0 |grep ‘inet addr’|awk ‘{print $2}’|sed -e ‘s/.*://’`”

HOSTFILE=”/etc/httpd/conf/mydomainhost”

echo “NameVirtualHost $HTTPADDR:80” > /etc/httpd/conf/virtualhost

echo “” > $HOSTFILE
echo “DocumentRoot /var/www/html” >> $HOSTFILE
echo “ServerName www.mydomain.com” >> $HOSTFILE
echo “
” >> $HOSTFILE

/etc/rc.d/init.d/httpd restart

##############################################
Note: The rc.updatehttpd must be 700 or 755

轉載: 加1B天光鏡好過UV濾鏡

轉載自: http://www.beautymodel.com

加1B天光鏡好過UV濾鏡

每當買新鏡頭時,都會考慮買一塊保護鏡頭的濾鏡,一般1B SKYLIGHT和UV兩種,前者比後者昂貴,有人說UV只是一塊玻璃,而1B拍人像會靚些又或者拍攝的色彩會準確些,所以會偏選1B,但這種說法似乎並不太合適。 1B skylight濾鏡正式來說是一塊有顏色的顏色濾鏡,是其中一塊標準化的矯色濾鏡,可隔除360nm或以下的光波(屬於較藍色的光線至UV),並同時可輕度吸收約550nm的光波(即綠色光線),總括是用作減輕於山區或海邊拍攝時的偏藍現象和樹葉的綠色反光,在綠油油草地上拍攝人像就可能用得著。

可是,在直接的陽光下拍攝,這塊1B濾鏡是全廢武功,換句話說,也僅是一塊玻璃。 UV濾鏡則是用來隔除肉眼看不見的紫外光,因此在色彩上(一般彩色菲林乳膜上根本無法對UV顯現色彩)是全無影響,但據廠方的建議,它的最大作用是將拍攝無限遠的模糊情況改善,但老實說,天氣才是最終決定因素,要是空氣中塵粒多或濕度高,加多少塊UV也是徙然的。

既然是這樣,甚麼濾鏡都不加又是否最好呢?對的,光學上是絕對是好的,因為加上了一塊玻璃,可能會弄巧反拙,但這又未必可以由肉眼察覺得到,再仔細衡量之下,買一片玻璃保護前組鏡片,似乎比起一丁點兒的光學損失來得重要。但是1B還是UV,那就悉隨尊便。但花錢買一塊有多層塗膜的UV已很足夠了,既可保護鏡頭,又可減少光學的損失,較為值得。

Bridging Firewall

OpenBSD 3.0

— Modify files

[ /etc/sysctl.conf ]
net.inet.ip.forwarding=1

[ /etc/rc.conf ]
ipfilter=YES

— start your bridge device
brconfig bridge0 add dc0 add dc1 up

(dc1, dc0) is your NIC device, eg (fx*) is intel pro…

— make your bridge device up at startup

[/etc/hostname.dc0]
up

[/etc/hostname.dc1]
up

[/etc/bridgename.bridge0]
add dc0 add dc1 up

Then see your brige now is ready, and you must use /etc/pfctl.conf to add your rules and use pfctl -R /etc/pfctl.conf to reload your script

View Log?
cat /var/log/pflog | tcpdump -e -ttt -r –

Configure CVS Server on Redhat

http://www.xinetd.org/faq.html#cvss

Q. How do I setup a cvs server with xinetd?
A. A user wrote in with this suggestion:

inetd
cvspserver stream tcp nowait root /usr/bin/cvs cvs –allow-root=/home/pauljohn/cvsroot –allow-root=/home/pauljohn/cvsmisc pserver

xinetd
If you want to make the same work under xinetd, you save a config file in /etc/xinetd.d called cvspserver, (where the last line tells it the names of your repositories):
service cvspserver
{
socket_type = stream
protocol = tcp
wait = no
user = root
passenv =
server = /usr/bin/cvs
server_args = –allow-root=/home/pauljohn/cvsroot –allow-root=/opt/mycvsroot pserver
}

All the other cvs setup stuff is the same. This seems to work, afaik.

ipchains – NAT Sample

#!/bin/sh
#
#
# Invoked from /etc/rc.d/init.d/firewall.
# chkconfig: – 60 95
# description: Starts and stops the IPCHAINS Firewall \
# used to provide Firewall network services.

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
if [ ${NETWORKING} = “no” ]
then
exit 0
fi

if [ ! -x /sbin/ipchains ]; then
exit 0
fi

# See how we were called.
case “$1” in
start)
echo -n “Starting Firewalling Services: ”

ipchains -F # Clean all rules
ipchains -X # Clean user-defined chain
echo “1” > /proc/sys/net/ipv4/ip_forward
echo “1” > /proc/sys/net/ipv4/ip_always_defrag

# load module for NAT soure redirect
/sbin/modprobe ip_masq_ftp ports=21,4559 #FTP, Hylafax
/sbin/modprobe ip_masq_raudio ports=554,7070,7071,6970,6971 # realplayer,rstp, quicktime, wmplayer…etc
/sbin/modprobe ip_masq_irc #IRC
/sbin/modprobe ip_masq_vdolive #VOD
/sbin/modprobe ip_masq_cuseeme #cuseeme
/sbin/modprobe ip_masq_quake #quake
/sbin/modprobe ip_masq_pptp #PPTP

ipchains -P forward DENY # Define default policy forward deny
ipchains -M -S 36000 10 60 # Define MASQ time out

ipchains -A forward -i ppp0 -s 192.168.0.0/24 -j MASQ # NAT rule

;;
stop)
echo -n “Shutting Firewalling Services: ”

# Remove all existing rules belonging to this filter
ipchains -F

# Delete all user-defined chain to this filter
ipchains -X

# Reset the default policy of the filter to accept.
ipchains -P input ACCEPT
ipchains -P output ACCEPT
ipchains -P forward ACCEPT

;;
status)
status firewall
;;
restart|reload)
$0 stop
$0 start
;;
*)
echo “Usage: firewall {start|stop|status|restart|reload}”
exit 1
esac

exit 0

48-Bit LBA Support for ATAPI Disk Drives in Windows 2000

48-Bit LBA Support for ATAPI Disk Drives in Windows 2000
Article ID : 305098
Last Review : November 13, 2003
Revision : 1.0
This article was previously published under Q305098
On this Page
SYMPTOMS
RESOLUTION
STATUS
MORE INFORMATION

SYMPTOMS
Windows 2000 Service Pack 2 (SP2) and earlier versions of Windows 2000 do not support 48-bit Logical Block Addressing (LBA) as defined in the ATA/ATAPI 6.0 specification.
RESOLUTION
To resolve this problem, obtain the latest service pack for Windows 2000. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
260910 How to Obtain the Latest Windows 2000 Service Pack
The English-language version of this fix should have the following file attributes or later: Date Time Version Size File name
——————————————————–
Continue reading “48-Bit LBA Support for ATAPI Disk Drives in Windows 2000”