I have the following Nginx configuration, but I need to convert it to be compatible with Apache. I have almost zero experience in networking and have no clue where to begin.

location ^~ /static {

I'd really appreciate it if someone could give me some hints.


It's pretty self-explanatory... (Apache Docs)

Your equivalent command syntax in Apache would basically be, I believe, something like this:

ProxyPass "/static" ""

(You may also have to do `"/static/" possibly, but I would have to do further testing.)

Alternatively, this may be what you want instead:

<Location "/path/to/docroot/static">
    ProxyPass ""
  • Thanks for the response. What about the regex part? "^~" – Blademaster Sep 24 '20 at 18:06
  • @Blademaster ^~ is processed as non-regex. From the NGINX docs: If the longest matching prefix location has the “^~” modifier then regular expressions are not checked. – Thomas Ward Sep 24 '20 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.