技术联盟

Apache别名配置

Alias /aa/ “D:/PHP_WorkSpace/”

<Directory “D:/PHP_WorkSpace/”>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
</Directory>

 

wamp自带的phpmyadmin的别名配置

Alias /phpmyadmin “E:/wamp/apps/phpmyadmin4.0.4/”

# to give access to phpmyadmin from outside
# replace the lines
#
# Order Deny,Allow
# Deny from all
# Allow from 127.0.0.1
#
# by
#
# Order Allow,Deny
# Allow from all
#

<Directory “E:/wamp/apps/phpmyadmin4.0.4/”>
Options Indexes FollowSymLinks ExecCGI
AllowOverride all
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
</Directory>

 

Apache 2.4以上版本设置访问虚拟目录方法

  1. 找到 http.conf
  2. 找到IfModule dir_module 标签<IfModule dir_module>
    DirectoryIndex index.html
    Alias /gz “/var/www/html/zentaopms/www/”
    <Directory /var/www/html/zentaopms/www/>
    AllowOverride None
    # Allow open access:
    Require all granted
    </directory>
    </IfModule>
  3. 重启apache
  4. 通过浏览器访问gz 达到访问 指定目录的效果

Share this:

码字很辛苦,转载请注明来自技术联盟《Apache别名配置》

评论