【发布时间】:2014-10-04 14:24:51
【问题描述】:
我一直关注this guide 使用虚拟主机设置 WAMP 项目。
当我浏览到“localhost/website”时,它会加载我的主页,但没有样式表或任何图像。这是文件结构:
- wamp/www/website/index.php
- wamp/www/website/images/image.png
- wamp/www/website/styles/style.css
httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot "c:/wamp/www"
ServerName localhost
ServerAlias localhost
<Directory "c:/wamp/www">
AllowOverride All
Require local
</Directory>
</VirtualHost>
<VirtualHost *:80>
DocumentRoot "c:/wamp/www/website"
ServerName website
<Directory "c:/wamp/www/website">
AllowOverride All
Require local
</Directory>
</VirtualHost>
---
另外,顺便说一句,我无法让“我的虚拟主机”部分出现在 wampmanager 菜单中;我已经添加了指南中的参数并重新启动了 wampserver,但我仍然没有看到它。这是我在 wampmanager.tpl 中的 [Menu.Left] 部分:
[Menu.Left]
;WAMPMENULEFTSTART
Type: separator; Caption: "Powered by Alter Way"
Type: item; Caption: "${w_localhost}"; Action: run; FileName: "${c_navigator}"; Parameters: "http://localhost/"; Glyph: 5
;WAMPPROJECTSUBMENU
;WAMPVHOSTSUBMENU
【问题讨论】:
-
你检查.css文件的链接是否正确使用开发者工具n检查你的css文件是否被加载