刚刚装了apache,就是简单的作为一个httpserver服务器使用,安装过程不需要多说,只是要记录一下如何更改默认的共享目录
在安装目录下的文件conf/httpd.conf中,找到下面这几行
#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "D:/apache_share"
#
# Each directory to which Apache has access can be configured with respect
# to which services and features are allowed and/or disabled in that
# directory (and its subdirectories).
#
# First, we configure the "default" to be a very restrictive set of
# features.
#
<Directory />
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#
#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "D:/apache_share">
将DocumentRoot后面的目录改为自己想要的,还有下面的<Directory "D:/apache_share" 也要一起修改。
修改完成后,restart一下apache,然后在浏览器地址栏输入localhost,或者电脑的ip地址