阿帕奇的DocumentRoot到网络目录的虚拟主机 [英] Apache DocumentRoot to a Network Directory for Virtual Host

查看:702
本文介绍了阿帕奇的DocumentRoot到网络目录的虚拟主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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>

此配置不工作,服务无法启动​​SERVICES.MSC,但如果我试图在CMD.EXE运行httpd.exe那么它的成功,显然它不是好办法。

This configuration is not working, Services can't start from Services.msc but if i tried to run httpd.exe in cmd.exe then it successful and obviously its not good way.

我都试过,但别名仍无法正常工作,服务运行但是当我访问它的 403访问错误。

I have tried Alias but still not working, services Run but when i access its 403 Access Error.

我试图映射网络驱动器到Z:但服务无法从SERVICES.MSC运行

I tried Map Network Drive to Z: but Services Fail to run from Services.msc

做任何一件有很好的解决方案,从网络目录或网络驱动器运行Apache的DocumentRoot的虚拟主机。

Do any one have good solution to Run Apache DocumentRoot from a Network Directory or Network Drive for virtual host.

推荐答案

下面就是答案 http://adam-carter.com/文章/ 158


  1. 您的DocumentRoot更改为网络共享(驱动器重新映射
    似乎不工作)。例如:DocumentRoot的//路径/要/股

  1. Change your DocumentRoot to the network share (drive remapping doesn’t seem to work). Example: DocumentRoot "//path/to/share"

请确保在你的配置更新DocumentRoot路径

Make sure to update the DocumentRoot path in your config

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

Edit the Apache service and On the "Log On’" tab, click the "Browse" button next to the "This account" radio button.

在有访问权限的网络共享帐户名称,并单击确定

Type in an account name that has access privileges to the network share and click "OK"

输入用户重启Apache正确的密码,你的LOL方式向银行。

Enter the correct password for the user Restart Apache and LOL your way to the bank.

使用此,您可以添加网络驱动器,网络目录到两个虚拟主机,以及在别名。

Using this you can add Network Drive, Network Directory to both Virtual Host as well as in Alias.

这篇关于阿帕奇的DocumentRoot到网络目录的虚拟主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆