ปรับแต่ง config apache ที่ file http.conf
UserDir public_html
UserDir disabled root toor daemon operator bin tty kmem games news man sshd bind proxy _pflogd _dhcp uucp pop www nobody mailnull smmsp
<Directory “/home/*/public_html”>
AllowOverride FileInfo AuthConfig Limit Indexes
Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec
<Limit GET POST OPTIONS>
Order allow,deny
Allow from all
</Limit>
<LimitExcept GET POST OPTIONS>
Order deny,allow
Deny from all
</LimitExcept>
</Directory>
<Directory “/home/*/public_html/cgi-bin”>
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
เพิ่ม user โดยใช้ shell
//////in the shell///
adduser mike
su - mike
cd /home/mike
mkdir -p /home/mike/public_html/cgi-bin
mkdir -p /home/mike/logs
ln -s public_html www
chmod 755 public_html
chmod a+r public_html/*
cd /home/
chmod 711 mike
//////end in the shell///
//now edit your httpd.conf//
<VirtualHost *:80>
ServerName mike.server.com
ServerAdmin mike@server.com
DocumentRoot /home/mike/www
TransferLog /home/mike/logs/access-log
ScriptAlias /cgi-bin/ /home/mike/www/cgi-bin/
</VirtualHost>
///end//////////////
















Be The First To Comment
Related Post
Please Leave Your Comments Below