Css http://localhost 在WAMP上工作不正常

Css http://localhost 在WAMP上工作不正常,css,localhost,wamp,Css,Localhost,Wamp,我已经尝试了回答的WAMP localhost问题,不幸的是没有成功 我在我的机器(Windows 7)上安装了WAMPSERVER 2.4.4,但无法正确链接我正在处理的网站的引导CSS文件。当我通过localhost(localhost/netwerken/index.htm)访问站点时,会显示html,但样式完全被破坏 WAMP服务器显示为“服务器联机”,并使用端口80: 我使用绝对路径链接到CSS样式表: <!-- Bootstrap core CSS --> <li

我已经尝试了回答的WAMP localhost问题,不幸的是没有成功

我在我的机器(Windows 7)上安装了WAMPSERVER 2.4.4,但无法正确链接我正在处理的网站的引导CSS文件。当我通过localhost(localhost/netwerken/index.htm)访问站点时,会显示html,但样式完全被破坏

WAMP服务器显示为“服务器联机”,并使用端口80:

我使用绝对路径链接到CSS样式表:

<!-- Bootstrap core CSS -->
<link href="http://localhost/netwerken/css/bootstrap.min.css" rel="stylesheet">

<!-- Custom styles for this template -->
<link href="http://localhost/netwerken/css/offcanvas.css" rel="stylesheet">
我还尝试将端口更改为8080,但仍然得到相同的错误。WAMP自动强制我以管理员身份执行

你能给我指出正确的方向吗?出了什么问题


如何更改文件权限?

这是windows,文件权限不会成为问题

问题将出现在httpd.conf和安全设置中

以下是线索
客户端::1:50536]
。它使用的是IPV6 ip地址,因此我猜测您不允许从环回地址::1进行访问

为了证明我在正确的轨道上,如果您在浏览器中使用此地址,它应该工作
http://127.0.0.1/netwerken/index.php
。。。假设您正在运行一个名为index.php的脚本,如果没有,请使用您正在运行的脚本

首先检查您的c:\windows\system32\drivers\etc\hosts文件是否包含这两行

127.0.0.1  localhost
::1     localhost
然后检查httpd.conf(使用wampmanager菜单进行编辑,以获得正确的文件)

查看本节,它使用较旧的Apache2.2语法

<Directory "d:/wamp/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
#    Require all granted
#   onlineoffline tag - don't remove
     Order Deny,Allow
     Deny from all
     Allow from 127.0.0.1
     Allow from ::1
     Allow from localhost
</Directory>

#
#选项指令的可能值为“无”、“全部”,
#或以下任何组合:
#索引包括以下符号链接符号链接所有者匹配执行CGI多视图
#
#请注意,“多视图”必须显式命名为*--“所有选项”
#不给你。
#
#期权指令既复杂又重要。请看
# http://httpd.apache.org/docs/2.4/mod/core.html#options
#了解更多信息。
#
选项索引跟随符号链接
#
#AllowOverride控制可在.htaccess文件中放置的指令。
#它可以是“全部”、“无”或关键字的任意组合:
#AllowOverride文件信息AuthConfig限制
#
允许超越所有
#
#控制谁可以从此服务器获取内容。
#
#要求所有授权
#onlineoffline标记-不删除
命令拒绝,允许
全盘否定
允许从127.0.0.1开始
允许来自::1
允许从本地主机
并将其更改为

<Directory "d:/wamp/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    #   onlineoffline tag - don't remove
    Require local
    # Apache 2.4 syntax for any of the addresses 127.0.0.1 or ::1 or localhost
</Directory>

#
#选项指令的可能值为“无”、“全部”,
#或以下任何组合:
#索引包括以下符号链接符号链接所有者匹配执行CGI多视图
#
#请注意,“多视图”必须显式命名为*--“所有选项”
#不给你。
#
#期权指令既复杂又重要。请看
# http://httpd.apache.org/docs/2.4/mod/core.html#options
#了解更多信息。
#
选项索引跟随符号链接
#
#AllowOverride控制可在.htaccess文件中放置的指令。
#它可以是“全部”、“无”或关键字的任意组合:
#AllowOverride文件信息AuthConfig限制
#
允许超越所有
#
#控制谁可以从此服务器获取内容。
#
#onlineoffline标记-不删除
要求本地
#Apache 2.4语法,用于任何地址127.0.0.1或::1或localhost

,WampServer 2.4中发布了一些错误,这将告诉您如何修复这些错误

对于Windows平台上存在此问题的其他人,问题可能是文件设置了加密位


有关完整的解释和解决方案,请参阅。

更改css文件的权限,因为您在Windows上运行WAMP,管理员可能会这样做it@pranav-哇,这看起来就像错误信息一样P@KevinPeiWAMP自动强制您以管理员身份运行它。仍然不起作用。如何更改文件权限?您必须了解,文件权限与Xampp、Apache或万维网无关。首先,打开Windows资源管理器,找到文件/文件夹,右键单击它,选择“属性”并选中“安全”选项卡。解决了问题。回答得很好。谢谢
<Directory "d:/wamp/www">
    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   AllowOverride FileInfo AuthConfig Limit
    #
    AllowOverride All

    #
    # Controls who can get stuff from this server.
    #
    #   onlineoffline tag - don't remove
    Require local
    # Apache 2.4 syntax for any of the addresses 127.0.0.1 or ::1 or localhost
</Directory>