Quantcast
Channel: Apache: Return static string for location - Server Fault
Browsing latest articles
Browse All 5 View Live

Answer by NodeUnderflow for Apache: Return static string for location

A better solution is to use mod_lua. This also obviates the need for mod_rewrite (which the httpd docs discourage). See https://gist.github.com/james2doyle/f09b0e159bb30836e593 for an example.

View Article



Answer by MrWhite for Apache: Return static string for location

Further to @João Alves creative answer you can set the appropriate Content-Type and other custom headers by setting an environment variable on the RewriteRule and using the Header directive to set...

View Article

Answer by João Alves for Apache: Return static string for location

Yes it is kinda possible (in Apache 2.4).Just add the following directives:ErrorDocument 200 "{\"foo\": \"bar\"}"RewriteEngine OnRewriteRule "^/.well-known/foo$" - [R=200,L]Unfortunately it is (to my...

View Article

Answer by Andrew Schulman for Apache: Return static string for location

Instead of inserting the content directly in an Apache directive, you can put the content in a file and use an Alias:Alias /.well-known/foo /path/to/content.json<Location "/.well-known/foo">...

View Article

Apache: Return static string for location

For a .well-known path, I want to return a static JSON file/string.With nginx, this seems to be possible without creating that file by specifying the content in the configuration file:location...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images