apache中的Alias怎么配置?

原创 apacheAlias配置 收藏

apache中配置Alias,如下格式

<VirtualHost *:80>  
     ServerAdmin fanglor@163.com  
     DocumentRoot /server/www  
     <Directory />  
	     Options FollowSymLinks  
	     AllowOverride None  
     </Directory>  
     <Directory /server/www/>  
	    Options Indexes FollowSymLinks MultiViews  
	    AllowOverride None  
	    Order allow,deny  
	    allow from all  
    </Directory>  
 
Alias /suizhou "/exports/suizhou"  
<Directory "/exports/suizhou">  
    Options  Indexes  
    AllowOverride AuthConfig FileInfo  
    Order allow,deny  
    Allow from all  
</Directory>  
</VirtualHost>

注意,要将httpd.conf的

User和Group设置为有权限访问Alias指向目录。否则访问会出现403 forbidden


Leave Your Comment

Your email will not be published or shared. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="">

*
请输入图片中的字符以验证你并非垃圾机器人. 点击图片收听验证码的语音版.
点击这里收听此验证码的语音版本