LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-22-2020, 04:27 AM   #1
morenz
LQ Newbie
 
Registered: Jan 2020
Location: /home/morenz
Distribution: Debian
Posts: 2

Rep: Reputation: Disabled
Using ProxyPass in Apache 2.4 results in "AH00128: File does not exist:" error


Hi all,
running Apache 2.4 on Debian 10.

I need to redirect a virtual path (/some/path) to another URI (/path/to/another/uri) in a Node.js instance running on the same server, listening on port 6666

As you can see Node.js is up and running and the (empty) reply is correct.
Code:
root@test:/var/www/server-local# curl http://localhost:6666/path/to/another/uri
<html></html>
To achieve the redirection, I used a reverse proxy
Code:
<Location /some/path>
    ProxyPass http://localhost:6666/path/to/another/uri
    ProxyPassReverse http://localhost:6666/path/to/another/uri
</Location>
that's not working: 404

I have other instances of ProxyPass (with other URIs, so there's no need to check for overrides)

After a bit of headbanging and lowering the LogLevel, I discovered that I have this error in logs
Code:
[Wed Jan 22 09:42:02.592536 2020] [core:info] [pid 10570] [client a.b.c.d:58375] AH00128: File does not exist: /var/www/html/some/path
It seems that it's searching for a real directory in the file system, that obviously is not present.
I read about permission issues, but it doesn't seem to be the right path.

I'm a bit stuck. A 10-minute do-and-forget work has took me off the whole day.

Ideas?

Thanks in advance
Morenz
 
Old 01-22-2020, 10:15 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
Did you restart apache after adding the reverse proxy stuff? Also you need to clear your browser cache.
If it still doesn't work, you may try the following syntax omitting the <Location ...> directive:
Code:
ProxyPass /some/path http://localhost:6666/path/to/another/uri
ProxyPassReverse /some/path http://localhost:6666/path/to/another/uri
Regards
 
Old 01-30-2020, 11:53 AM   #3
morenz
LQ Newbie
 
Registered: Jan 2020
Location: /home/morenz
Distribution: Debian
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi,
back from a devastating week.
The problem was a human error. I thought that the last part in the path was part of the path itself, but after asking to the developer, I discovered that /uri actually was the command itself, and not part of the URI.
The "real" URI stopped to previous level, so

Code:
ProxyPass /some/path/ http://localhost:6666/path/to/another/
ProxyPassReverse /some/path/ http://localhost:6666/path/to/another/
worked like a charm

Thanks for the time spent!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cannot login to funtoo linux. UID 0 does not exist. no users or groups seem to exist. whansard Linux - Security 1 12-19-2018 03:40 AM
[SOLVED] executable file error: "No such file of directory" when file does exist dalgrim Slackware 8 11-03-2014 11:28 AM
Apache ProxyPass doubt (ubuntu 6.10, apache 2.0) Carlos2dub Linux - Server 1 05-28-2008 03:43 AM
Apache + Mod_proxy "ProxyPass" ziox Linux - Networking 0 04-11-2006 10:25 AM
Apache ProxyPass/VirtualHost question lil_drummaboy Linux - Networking 2 11-10-2004 11:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration