Apache DocumentRoot到虚拟主机的网络目录

Was*_* A. 2 windows apache network-drive vhosts document-root

NameVirtualHost *:80
<VirtualHost *:80>
ServerName tmp
DocumentRoot "//192.168.1.25/www/"
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)

此配置无法正常工作,服务无法从Services.msc启动,但如果我尝试在cmd.exe中运行httpd.exe,那么它成功并且显然不是很好的方法.

我尝试了Alias但仍然无法正常工作,服务运行但是当我访问它时 403 Access Error.

我尝试将Map Network Drive映射到Z:但服务无法从Services.msc运行

对于从虚拟主机的网络目录或网络驱动器运行Apache DocumentRoot,任何人都有良好的解决方案.

Was*_* A. 8

这是答案http://adam-carter.com/posts/158

  1. 将DocumentRoot更改为网络共享(驱动器重新映射似乎不起作用).示例:DocumentRoot"// path/to/share"

  2. 确保更新配置中的DocumentRoot路径

  3. 编辑Apache服务,在"登录"选项卡上,单击"此帐户"单选按钮旁边的"浏览"按钮.

  4. 键入对网络共享具有访问权限的帐户名称,然后单击"确定"

  5. 为用户输入正确的密码重启Apache和LOL到银行.

使用此功能,您可以将网络驱动器,网络目录添加到虚拟主机以及Alias中.