本人結(jié)合網(wǎng)上資料和個人的實踐,利用一個下午的時間寫出了這個適用于資源下載型網(wǎng)站的典型配置。這種配置的WEB網(wǎng)站初步實現(xiàn)了IP線程和線程流量的管理,同時proftpd用于上傳資源,ssh用于主機(jī)管理。無疑這樣可以自己支配寶貴的網(wǎng)絡(luò)帶寬,文章后面有個簡單的防火墻配置僅供參考,我用的linux版本是redhat as 3.0。希望大家在看了這篇文章后多多和我交流, MAIL:[email protected]
在三行之后添加如下內(nèi)容: #!/bin/sh # # Startup script for the Apache Web Server # chkconfig: - 85 15 # description: Apache is a World Wide Web server. It is used to serve / # HTML files and CGI. # processname: httpd # pidfile: /usr/local/apache/log/httpd.pid # config: /usr/local/apache/conf/httpd.conf
ServerName "llzqq's ftp service" ServerType standalone DefaultServer on
# Port 21 is the standard FTP port. Port 21
# Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. Umask 022
MaxInstances 10
# Set the user and group under which the server will run. User nobody Group ftp
# To cause every FTP user to be "jailed" (chrooted) into their home # directory, uncomment this line. DefaultRoot ~
# Normally, we want files to be overwriteable. <Directory /> AllowOverwrite on </Directory>
# We want 'welcome.msg' displayed at login, and '.message' displayed # in each newly chdired directory. DisplayLogin welcome.msg DisplayFirstChdir .message RequireValidShell no
#Limit User of being enbled login ftp server <Limit LOGIN> AllowGroup ftp DenyAll </Limit> # <Directory /home/test> <Limit WRITE> DenyGroup ftp </Limit> TransferRate RETR 51200 group ftp </Directory> <Directory /home/upload> <Limit RMD RNFR DELE RETR> DenyGroup ftp </Limit> TransferRate STOR 256000 group ftp </Directory>