在本机hugo server 打开http://localhost:1313/是这个效果
上传到docker nginx 效果是这样的。
查看logs/error.log
2024/06/14 12:48:27 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:27 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:29 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
比如第一个文件 livereload.js 在hugo 生成的public下,根本就没有这个文件。
万能的吧友 指点一下吧。
上传到docker nginx 效果是这样的。
查看logs/error.log
2024/06/14 12:48:27 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:27 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:29 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *1 open() "/usr/share/nginx/html/livereload.js" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /livereload.js?mindelay=10&v=2&port=1313&path=livereload HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
2024/06/14 12:48:30 [error] 29#29: *2 open() "/usr/share/nginx/html/site.webmanifest" failed (2: No such file or directory), client: 192.168.8.99, server: blog.869527.best, request: "GET /site.webmanifest HTTP/2.0", host: "blog.869527.best:588", referrer: "https://blog.869527.best:588/"
比如第一个文件 livereload.js 在hugo 生成的public下,根本就没有这个文件。
万能的吧友 指点一下吧。