Tag Info

Hot answers tagged

1

This should be all you need: RewriteEngine On RewriteRule ^/api/(.*)$ https://example.com/api/$1 [P,QSA,L] Apache will basically proxy your requests by creating new http requests via the mod_rewrite module, which is enabled by default


1

I found the solution to this: The problem is that overrides all other defined vhosts. It was necessary for my setup to let this gitlab instance run under a different port and then proxy to this one from the main configuration. So my vhost is now <VirtualHost:8081> and before a Listen 8081. In the config file where I wanted to configure the suburls, ...


1

This setup with the P flag is the right one for what you want to do. The doc about the P flag states: Use this flag (P) to achieve a more powerful implementation of the ProxyPass directive Some things about the example: as mentioned by Andrew in his answer, the DOCUMENT_ROOT is not necessary. The second is just to pay attention where these ...


1

In Apache 2.4, the If directive will apply directives if conditions are true at runtime. So for example: <If "! -f %{REQUEST_FILENAME}"> ProxyPass ... </If> See the Apache 2.4 documentation for the If directive and expressions. By the way the docs say that REQUEST_FILENAME is the full file path of the requested resource, so you shouldn't ...



Only top voted, non community-wiki answers of a minimum length are eligible