阿帕奇不加载远程浏览器CSS文件,但工作在本地主机 [英] Apache not loading CSS files on remote browsers but works on localhost

查看:152
本文介绍了阿帕奇不加载远程浏览器CSS文件,但工作在本地主机的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有我的笔记本电脑,我使用的Web应用程序开发的Ubuntu安装。当我在键入http://localhost/blah.php 我看到我的PHP网页,我通常会与所有css样式加载和渲染罚款。

I have an ubuntu installation on my laptop i use for web app development. When i type in http://localhost/blah.php i see my php web page as i normally would with all css style loaded and rendering fine.

当我尝试通过在键入IP地址在页面加载,但没有任何CSS样式都从远程计算机连接到同一Apache服务器。我也得想从虚拟机连接到Apache服务器在同一机器同样的问题。我希望得到这个工作,所以我可以测试在IE中我的web应用程序,但显然CSS不加载是一个问题。任何提示?

When i try to connect to this same apache server from a remote machine by typing in the IP address the page loads but without any css styling at all. I also get the same problem trying to connect to the apache server from a virtual machine on the same box. I would like to get this working so i can test my web apps in IE but obviously css not loading is a problem. Any tips ?

推荐答案

看看你的源$ C ​​$ C,并期待您的样式表是如何被引用。

Look into your source code and look how your style sheets are referenced.

如果你有 HTTP引用。//localhost/mystylesheet.css ,那是你的问题就在那里。

If you have references to http://localhost/mystylesheet.css, that's your problem right there.

如果没有帮助,试图直接(在浏览器中输入地址)来访问样式表,告诉我们发生了什么。还张贴您正在使用的URL。 HTML文档的您所呼叫的负责人也将是有益的。

If that doesn't help, try to access a style sheet directly (enter the address in the browser) and tell us what happens. Also post the URL you are using. The head of the HTML document you are calling would also be helpful.

这篇关于阿帕奇不加载远程浏览器CSS文件,但工作在本地主机的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆