V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
changshengjie
V2EX  ›  Linux

小白求救, Apache 服务器发布网站, js 文件怎么加载不上

  •  
  •   changshengjie · Aug 2, 2022 · 2721 views
    This topic created in 1364 days ago, the information mentioned may be changed or developed.

    如题,网站源码本地运行正常,但是放到腾讯云 CentOS7.6 的服务器上只能显示 index.html 页面的内容,但是 js 包括一个音乐文件都没有成功,我把 js 文件放在 var/www/bgi 请问是哪里出了问题。

    seers
        1
    seers  
       Aug 2, 2022 via Android
    1.检查资源路径
    2.检查文件权限
    hay0577
        2
    hay0577  
       Aug 2, 2022
    F12 打开网页调试.看看 js 加载的时候是什么状态.
    cxxnullptr
        3
    cxxnullptr  
       Aug 2, 2022
    检查一下 mime types
    cheese
        4
    cheese  
       Aug 2, 2022
    资源路径,看看是不是写死了
    itning
        5
    itning  
       Aug 2, 2022
    开 ssh 我上去看看
    changshengjie
        6
    changshengjie  
    OP
       Aug 2, 2022
    感谢老铁们,根据提示问题找到了,应该就是我把路径分开放了,现在把所有的源码放到 /html 文件下,然后显示正常,但是有个背景音就第一遍有,我在看下,感谢老铁们
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3001 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 15:12 · PVG 23:12 · LAX 08:12 · JFK 11:12
    ♥ Do have faith in what you're doing.