Skip to content

奇怪的错误unexpected token Eof () on line 3, column 1 #699

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
JxiaoC opened this issue Nov 4, 2024 · 1 comment
Closed

奇怪的错误unexpected token Eof () on line 3, column 1 #699

JxiaoC opened this issue Nov 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@JxiaoC
Copy link

JxiaoC commented Nov 4, 2024

当我使用下面这行nginx配置文件时,在保存过后,会给出保存完成的提示

proxy_cache_path /home/xiaoc/nginx_cache/test/cache levels=1:2 keys_zone=img_speed:50m inactive=60m max_size=100m;

server {
    server_name test.com;
    listen 1023;
}

image

但是当我点击右上角的高级模式,准备切换回普通模式的时候,会出现如下的报错提示

image

当我手动把第一行配置文件注释掉过后,又能正常保存了

image

  1. 我尝试过重新新建站点,并且完全手动输入配置文件,也会出现这个错误提示。
  2. 直接把之前的nginx配置文件复制过来,只要配置文件中有proxy_cache_path,就会有这个错误提示。
  3. 使用nginx -t可以正常通过校验(虽然截图上显示的禁用,但实际上在/etc/nginx/sites-enabled下是有test.conf这个文件的)

我用的是openresty,不知道和这个有没有关系,我的app.ini中的nginx配置如下

[nginx]
AccessLogPath   = /usr/local/openresty/nginx/logs/access.log
ErrorLogPath    = /usr/local/openresty/nginx/logs/error.log
LogDirWhiteList = /usr/local/openresty/nginx/logs/
ConfigDir       = /etc/nginx
PIDPath         = /usr/local/openresty/nginx/logs/nginx.pid
TestConfigCmd   = /usr/local/openresty/nginx/sbin/nginx -t
ReloadCmd       = /usr/local/openresty/nginx/sbin/nginx -s reload
RestartCmd      = /usr/local/openresty/nginx/sbin/nginx -s reload
@JxiaoC JxiaoC added the bug Something isn't working label Nov 4, 2024
@JxiaoC JxiaoC closed this as completed Nov 4, 2024
@0xJacky 0xJacky reopened this Nov 4, 2024
@Hintay Hintay added the gonginx This issue is related to the dependency gonginx label Nov 5, 2024
@0xJacky 0xJacky removed the gonginx This issue is related to the dependency gonginx label Apr 14, 2025
@0xJacky
Copy link
Owner

0xJacky commented Apr 14, 2025

这个是我的锅,跟 gonginx 无关,已在 92dc61e 修复,下个版本发布。

补充说明一下,rc.6 将会加入一个新的功能用于图形化配置 Proxy Cache,未来您可以直接在图形界面中修改 proxy_cache_path 的参数

Image

@0xJacky 0xJacky closed this as completed Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

No branches or pull requests

3 participants