我有一个UBUNTU/APACHE盒,当我尝试使用HOST-NAME访问Web服务器时,它使我访问DocumentRoot(它是/ var/www)并向我显示所有文件/文件夹)。我有/ var/www/devel和var/www/live几个文件夹,我怎么能更新我的配置,以便当我通过它的主机名[http :// servername]它默认进入DocumentRoot的子文件夹。如何配置Apache的启用站点的配置?
我试图将DocumnetRoot更改为指向/ var/www/live,当我点击主机名时它会将我发送到正确的路径,但我无法再访问/ var/www/dev到[http:// servername/dev])。
这很可能是因为现在/ dev在DocumentRoot之外,我如何调整配置以便在[http:// servername]解析为/ live时仍可以访问[http:// servername/dev] 。
这里是我的配置...
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory "/var/www/dev">
AuthName "NTLM Authentication"
NTLMAuth on
NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"
NTLMBasicAuthoritative on
AuthType NTLM
require valid-user
</Directory>
<Directory "/var/www/live">
AuthName "NTLM Authentication"
NTLMAuth on
NTLMAuthHelper "/usr/bin/ntlm_auth --helper-protocol=squid-2.5-ntlmssp"
NTLMBasicAuthoritative on
AuthType NTLM
require valid-user
</Directory>