VPS侦探论坛

 找回密码
 注册
查看: 6949|回复: 1

[提问] nginx网站没有加载css

[复制链接]
发表于 2013-1-20 22:56:39 | 显示全部楼层 |阅读模式

军哥,我用了一个前端用nginx(你这边下载的),后端是apache的。。结果网站是可以访问,但是没有加载css。。
请问还需要如何设置不?我的操作方法是:
在/usr/local/nginx/conf/nginx.conf中的http里面添加了
proxy_set_header  Host $host;
proxy_set_header  X-Real-IP $remote_addr;
proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
在server里面添加了
location / {
                   proxy_pass  http://xx.xxx.xx.xx:80;
                        }
                location ~* \.(jpg|jpeg|gif|png)$ {
                        access_log  off;
                        expires  30d;
                        }
                location ~* \.(js|css)$ {
                        access_log  off;
                        expires  1d;
                        }
麻烦军哥帮忙看下哦。。
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2013-1-21 08:40:29 | 显示全部楼层


lnmpa不需要做其他设置直接添加虚拟主机就可以使用
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-9-17 03:00 , Processed in 0.025090 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表