Distributions
› Ubuntu
› Fedora
› CentOS
中文资源站
› 网易开源镜像站
changshengjie
V2EX  ›  Linux

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

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

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

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