Configure alias in Apache in the following format:
<Virtualhost *: 80> <br/> serveradmin webmaster @ localhost <br/> DocumentRoot/var/WWW <br/> <directory/> <br/> options followsymlinks <br/> AllowOverride none <br/> </directory> <br/> <directory/var/www/> <br/> options indexes followsymlinks Multiviews <br/> AllowOverride none <br/> order allow, deny <br/> allow from all <br/> </directory> <br/> ScriptAlias/cgi-bin // usr/lib/cgi-bin/<br/> <directory "/usr/lib/cgi-bin"> <br/> AllowOverride none <br/> options + execcgi-Multiviews + symlinksifownermatch <br/> order allow, deny <br/> allow from all <br/> </directory> <br/> errorlog $ {apache_log_dir}/error. log <br/> # possible values include: Debug, info, notice, warn, error, crit, <br/> # Alert, emerg. <br/> loglevel warn <br/> customlog $ {apache_log_dir}/access. log combined <br/> alias/doc/"/usr/share/doc/" <br/> <directory "/usr/share/doc/"> <br/> options indexes Multiviews followsymlinks <br/> AllowOverride none <br/> order deny, allow <br/> deny from all <br/> allow from 127.0.0.0/255.0.0.0 :: 1/128 <br/> </directory> <br/> alias/pics "/exports/flv12" <br/> <directory "/exports/flv12"> <br/> options indexes <br/> AllowOverride authconfig fileinfo <br/> order allow, deny <br/> allow from all <br/> </directory> <br/> alias/videos "/exports/flv14" <br/> <directory "/exports/flv14 "> <br/> options indexes <br/> AllowOverride authconfig fileinfo <br/> order allow, deny <br/> allow from all <br/> </directory> <br/> </virtualhost>
Note:
User and group are set to have the permission to access the directory pointed to by alias. Otherwise, the 403 Forbidden error occurs during access.