0

So I'm using liferay and an apache in docker and want to have the following URL localhost/tester when a user enters this I want headers to be added to their request. I tried to solve this with a simple virtual host

<VirtualHost *:80>
    ServerName localhost
    <Location /tester>
      RequestHeader append tester "true"
      Satisfy Any
      Allow from all
    </Location>
</VirtualHost>

But when I try to navigate to localhost/tester I just get "Resource not found"

  • Do you have content at the /tester location? – Andrew Schulman Apr 01 '21 at 01:51
  • No, i just wanted as a path through which i can add headers. So if a user goes through localhost/tester/index then they arrive at index with certain headers and if they go through localhost/index they arrive at index without those headers. – user625914 Apr 01 '21 at 07:05
  • You might run liferay, but this question doesn't show any trace of it anywhere – Olaf May 09 '21 at 19:00

1 Answers1

0

Apache is telling you that it doesn't know what content to serve from http://localhost/tester. You need to give it a DocumentRoot, say

DocumentRoot /var/www/html

and then create a file tester/index.html within that. The file can be empty.

Andrew Schulman
  • 8,811
  • 21
  • 32
  • 47