Step 0 - Reverse Proxy - returns 404 page not found

I have an older Oracle database (11g) that is behind on the newest TLS versions. I hit api’s currently by using a reverse proxy like so:

1. PLSQL does a post to http://local-ip-to-web-server/ai/chat/completions
adds headers
Content-Type: application/json
authentication: Bearer MY_API_KEY
data:
{
“model”: “gpt-3.5-turbo”,
“messages”: [
{
“role”: “system”,
“content”: “You are a poetic assistant, skilled in explaining complex programming concepts with creative flair.”
},
{
“role”: “user”,
“content”: “Compose a poem that explains the concept of recursion in programming.”
}
]
}

2. Reverse proxy:
ProxyPass /ai/ https://api.openai.com/
ProxyPassReverse /ai/ https://api.openai.com/

returns:
404 page not found

Notes:
The reverse proxy is set up the same way my others are ie:
ProxyPass /sageapi/ https://api.acccounting.sage.com/
ProxyPassReverse /sageapi/ https://api.accounting.sage.com/
on this web server I can run:
curl http://local-ip-to-web-server/sageapi/
responds with a json object

curl http://local-ip-to-web-server/ai/v1
responds with html for a 404 page not found

curl https://api.openai.com/v1
responds with a json object

I’m lost so far on why the reverse proxy gets a 404 page not found when the web server has no problem reaching the endpoint.

Until I get the reverse proxy working, I can’t even begin to test payloads.

As far as I can see, the reverse proxy is fine, but the api is returning the 404 error.

Has anyone had similar issues? I couldn’t find any in searches. Any help would be appreciated.

Please disregard. There was a new rogue config file added a couple weeks ago that was throwing off the web server. The 404 came from the web server and not the api. I am now hitting the api.

I’ll have to wait since we’re trying to get access to the new toys

1 Like

Thanks for coming back to let us know.

Hope you stick around. We’ve got a great community growing.