data-main,无法加载requirejs

时间:2017-05-24 13:46:06

标签: javascript nginx requirejs

加载https://hub-dev.andatech.com.au.

我在控制台出错:

Failed to load resource: the server responded with a status of 404 () main.js

查看源代码:我看到了

<script data-main="https://hub-dev.andatech.com.au/script/main.js" src="https://hub-dev.andatech.com.au/assets/js/require.js"></script> 

https://hub-dev.andatech.com.au/script/main.js粘贴到浏览器中,它会返回404。

似乎requirejs正在加载,任何人都可以发光。

我的nginx配置:

server {
  listen 80;
  listen [::]:80;

  server_name hub-dev.andatech.com.au www.hub-dev.andatech.com.au;
  return 301 https://$server_name$request_uri;
}

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  include snippets/ssl-hub-dev.andatech.com.au.conf;
  include snippets/ssl-params.conf;

  server_name hub-dev.andatech.com.au www.hub-dev.andatech.com.au;
  root /home/thehub/public_html;

  index index.php index.html index.htm index.nginx-debian.html;

  location / {
    try_files $uri $uri/ =404;
  }

  location ~ \.php$ {
    include snippets/fastcgi-php.conf;
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
  }

  location ~ /\.ht {
    deny all;
  }
}

0 个答案:

没有答案