Friday, October 20, 2006
virtual host in apache2
1, declare/unify all the virtual host with IP in /etc/hosts file or DNS.
2, plus the content as follow in the /etc/apache2/sites-enabled/000-default:
DocumentRoot /tmp/test
ServerName kk.org
# as least your must declare to parameter, the documentroot and servername.
be mind that all the servername you want to display must be declare in hosts or DNS.
2, plus the content as follow in the /etc/apache2/sites-enabled/000-default:
DocumentRoot /tmp/test
ServerName kk.org
# as least your must declare to parameter, the documentroot and servername.
be mind that all the servername you want to display must be declare in hosts or DNS.
Wednesday, October 18, 2006
ftpd
edit the /etc/vsftpd as follow:
local_enable=YES
write_enable=YES
chroot_local_user=YES
then restart vsftpd, the local user is enable now.
plus the follow inside the file mentioned upsite:
user_config_dir=/etc/vsftpd/vsftpd_user_conf
then we make the directory as clue
mkdir -p /etc/vsftpd/vsftpd_user_conf , be mind that it must be a dir.
then create the file and modify your user:
echo XXX > ftpuser
local_root=PATH to directory就可以更改用户的home directory
local_max_rate=XXXX就可以限制此用户的带宽.
cmds_allowed=XXXXX, 此用户可以使用的指令
local_enable=YES
write_enable=YES
chroot_local_user=YES
then restart vsftpd, the local user is enable now.
plus the follow inside the file mentioned upsite:
user_config_dir=/etc/vsftpd/vsftpd_user_conf
then we make the directory as clue
mkdir -p /etc/vsftpd/vsftpd_user_conf , be mind that it must be a dir.
then create the file and modify your user:
echo XXX > ftpuser
local_root=PATH to directory就可以更改用户的home directory
local_max_rate=XXXX就可以限制此用户的带宽.
cmds_allowed=XXXXX, 此用户可以使用的指令
Monday, October 09, 2006
authentication for http
step 1: edit /etc/apache2/site-enable/000-default:
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride authconfig
#none for default, authconfig make authen enable
authtype basic
authname 'testing'
authuserfile /etc/apache2/password
#mark the password file location
require user htpass
#"Require valid-user #all valid user" require valid user is default,
step 2: create a password file "password" with a user "htpass":
htpasswd -c /etc/apache2/password htpass
more apache setting in :
http://debian.ha.cn/htmldata/5/2005_10/article_176_1.html
DocumentRoot /var/www/
Options FollowSymLinks
AllowOverride authconfig
#none for default, authconfig make authen enable
authtype basic
authname 'testing'
authuserfile /etc/apache2/password
#mark the password file location
require user htpass
#"Require valid-user #all valid user" require valid user is default,
step 2: create a password file "password" with a user "htpass":
htpasswd -c /etc/apache2/password htpass
more apache setting in :
http://debian.ha.cn/htmldata/5/2005_10/article_176_1.html