Apache Web服务器的根目录是什么?Web服务器的根目录
我使用Windows XP。我的Apache服务器安装在:
C:\Program Files\Apache Software Foundation\
我想举办一个服务器及其手册说:
举动都从该目录文件和子目录到Web服务器的根目录
谢谢。
Apache Web服务器的根目录是什么?Web服务器的根目录
我使用Windows XP。我的Apache服务器安装在:
C:\Program Files\Apache Software Foundation\
我想举办一个服务器及其手册说:
举动都从该目录文件和子目录到Web服务器的根目录
谢谢。
如果您的问题涉及到Apache web服务器上设置虚拟主机。在httpd.conf
如果你已经安装了Apache 2从源,默认情况下
# vi /usr/local/apache2/conf/httpd.conf
Include conf/extra/httpd-vhosts.conf
修改的httpd-vhosts.conf如下所示设置命名为基础的虚拟主机设置两台主机。
当您访问thegeekstuff.com时,/ usr/local/apache2/docs/thegeekstuff下的文件将由Apache提供;与此站点的访问日志和的error_log会去下的/ usr /本地/ Apache2的/日志/ thegeekstuff
# vi /usr/local/apache2/conf/extra/httpd-vhosts.conf
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache2/docs/thegeekstuff"
ServerName thegeekstuff.com
ServerAlias www.thegeekstuff.com
ErrorLog "logs/thegeekstuff/error_log"
CustomLog "logs/thegeekstuff/access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/usr/local/apache2/docs/top5freeware"
ServerName top5freeware.com
ServerAlias www.top5freeware.com
ErrorLog "logs/top5freeware/error_log"
CustomLog "logs/top5freeware/access_log" common
</VirtualHost>
使用验证虚拟配置语法“的httpd -S”如下所示。当一切设置正确时,它只显示“Syntax OK”。
# /usr/local/apache2/bin/httpd -S
VirtualHost configuration:
Syntax OK
如果配置不正确,将显示警告消息,包括“目录不退出”消息,如下所示。
# /usr/local/apache2/bin/httpd -S
Warning: DocumentRoot [/usr/local/apache2/docs/top5freeware] does not exist
Warning: ErrorLog [/usr/local/apache2/logs/thegeekstuff] does not exist
Syntax OK
重新启动Apache和测试
#在/ usr /本地/ Apache2的/斌/的Apachectl重启
现在,当你去thegeekstuff.com(或www .thegeekstuff.com),Apache将提供来自/ usr/local/apache2/docs/thegeekstuff目录的文件。在`C
检查'www'文件夹:' –
在C中没有WWW文件夹:驱动器。 – Jay