Created
May 18, 2015 19:37
-
-
Save letsjustfixit/ad2d251879fbafbe5c02 to your computer and use it in GitHub Desktop.
Ghost apache reverse proxy + 301 redirect
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName ghost.example.com | |
ServerAlias ghost.example.com | |
CustomLog /var/log/apache2/ghost.example.com_access.log common | |
ErrorLog /var/log/apache2/ghost.example.com_error.log | |
# this redirect is always ignored | |
RedirectMatch 301 ^/services/whatever/?$ /other-page/ | |
#Exclude everything that needs a redirect | |
ProxyPass /services/whatever ! | |
ProxyPassMatch ^/(.+)$ http://127.0.0.1:2368/$1 | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment