apache虚拟目录配置

来源:互联网 发布:如何注册域名步骤 编辑:程序博客网 时间:2024/06/05 16:20

apache2.4虚拟目录配置

需要在httpd.conf中加入如下内容:
Alias /ws "D:/dev/php/ws"

<Directory "D:/dev/php/ws">    Options Indexes FollowSymLinks    AllowOverride None    Require all granted</Directory>

配置好后的httpd.conf的片段:

Define SRVROOT "C:/Apache24"ServerRoot "${SRVROOT}"DocumentRoot "${SRVROOT}/htdocs"<Directory "${SRVROOT}/htdocs">    ...</Directory><IfModule alias_module>    ScriptAlias /cgi-bin/ "${SRVROOT}/cgi-bin/"   Alias /ws "D:/dev/php/ws"</IfModule><Directory "D:/dev/php/ws">    Options Indexes FollowSymLinks    AllowOverride None    Require all granted</Directory>

这样就可以方位虚拟目录了http://localhost:80/ws 访问的是目录D:/dev/php/ws







PS : apache php模块设置http://blog.csdn.net/cheng545/article/details/53784694

0 0
原创粉丝点击