-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
I started using PHPNuGet to make a local chocolatey server. When I try to install a package or search, Chocolatey send the request correctly, but nginx is not able to process it and gives me errors in htaccess.lua
Any hint how to fix it?
Here's the error from nginx
2022/11/02 18:50:03 [error] 24#24: *1947 lua entry thread aborted: runtime error: /etc/nginx/lua/htaccess.lua:797: invalid capture index
stack traceback:
coroutine 0:
[C]: in function 'gsub'
/etc/nginx/lua/htaccess.lua:797: in function 'replace_server_vars'
/etc/nginx/lua/htaccess.lua:1055: in main chunk, client: 0.0.0.0, server: _, request: "GET /nuget/api/v2/Packages()?$filter=(tolo
wer(Id)%20eq%20'chocolatey')%20and%20IsLatestVersion HTTP/1.1", host: "www.www.www"
2022/11/02 19:25:01 [error] 23#23: *12 lua entry thread aborted: runtime error: /etc/nginx/lua/htaccess.lua:797: invalid capture index
stack traceback:
coroutine 0:
[C]: in function 'gsub'
/etc/nginx/lua/htaccess.lua:797: in function 'replace_server_vars'
/etc/nginx/lua/htaccess.lua:1061: in main chunk, client: 0.0.0.0, server: _, request: "GET /nuget/api/v2/Search()?$orderby=Id,Ver
sion%20desc&$skip=0&$top=30&searchTerm='choco'&targetFramework=''&includePrerelease=false HTTP/1.1", host: "www.www.www"
And here's the htaccess lines for these paths
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index\.php [NC]
RewriteCond %{REQUEST_URI} ^/nuget/api/v2/Packages\(\) [NC]
RewriteRule .* /nuget/api/v2/index.php?action=packages [QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !index\.php [NC]
RewriteCond %{REQUEST_URI} ^/nuget/api/v2/Search\(\) [NC]
RewriteRule .* /nuget/api/v2/index.php?action=search [QSA]
Metadata
Metadata
Assignees
Labels
No labels