Apache网络驱动器别名

Sor*_*Hat 1 windows apache networking alias

我已经通过stackoverflow搜索了一个类似的问题,但没有一个解决方案似乎有效.

我正在运行WAMP并且有一个网络驱动器T:\,我想在Apache中使用它作为别名.到目前为止,我已添加:

别名/ p \\ ps-file.server_location.edu\A $
<目录/ p>
订单允许,拒绝
所有
</ Directory>

但是,每当我尝试访问时,localhost/p我都会收到403禁止的消息说You don't have permission to access /p on this server.任何建议?

我已经尝试更改services.msc中的登录设置,但这会阻止apache一起启动.

编辑:我还必须在第一次连接时输入网络驱动器的登录信息.我可以以某种方式给apache我的登录信息吗?

Cal*_*tor 6

你需要使用正斜杠而不是反斜杠,或者使用额外的backslashas将它们全部转义,并将引号中的路径封闭,如Xophmeister所述.例如:

Alias /p "//ps-file.server_location.edu/A$/"
<Directory "//ps-file.server_location.edu/A$/">
Order allow,deny
Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)

要么

Alias /p "\\\\ps-file.server_location.edu\\A$\\"
<Directory "\\\\ps-file.server_location.edu\\A$\\">
Order allow,deny
Allow from all
</Directory>
Run Code Online (Sandbox Code Playgroud)

除非在用于运行apache服务的用户配置文件中创建映射驱动器,否则使用UNC路径是正确的.