xampp 1.8.1。服务器已启动,但别名无效

时间:2012-12-13 16:06:10

标签: apache xampp alias

我已成功升级到xampp 1.8.1。 Apache和MySQL服务器启动正常。

但是,我无法让我的别名在httpd.conf中工作。 IE无法显示页面

我有:

Alias /tnl "H:northern_light"
<Directory "H:northern_light">
     DirectoryIndex index.php    
     Options All
     AllowOverride All
     Require all granted
</Directory>

我尝试了很多选择。另外,我尝试在Apache上更改端口。

尝试过127.0.0.1/tnl,localhost / tnl等

有什么想法吗?

2 个答案:

答案 0 :(得分:1)

将目录选项替换为:

    Alias /tnl "H:/northern_light"
    <Directory "H:/northern_light">
        AllowOverride None
        Options None
        Require all granted
    </Directory>

我个人使用:“索引MultiViews”而不是“none”在选项上允许目录索引。 像这样:

    Alias /tnl "H:/northern_light"
    <Directory "H:/northern_light">
        AllowOverride None
        Options Indexes MultiViews
        Require all granted
    </Directory>

答案 1 :(得分:-1)

根据ApacheFriends - XAMPP的创造者

# Alias: Maps web paths into filesystem paths and is used to
# access content that does not live under the DocumentRoot.
# Example:
# Alias /webpath /full/filesystem/path
#
# If you include a trailing / on /webpath then the server will
# require it to be present in the URL.  You will also likely
# need to provide a <Directory> section to allow access to
# the filesystem path.

这意味着: