Alias configuration of Apache

Source: Internet
Author: User
Tags 403 forbidden error

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.