Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Commit

Permalink
Exclude Pulp 2 API calls from being handled by Pulp 3
Browse files Browse the repository at this point in the history
  • Loading branch information
dkliban committed Sep 28, 2020
1 parent 47a7cc4 commit ad530ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGES/7481.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed Apache config bug that prevented Pulp 2 API from being accessible.
4 changes: 4 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ must be one of these currently supported operating systems:
* Debian Buster (needs `allow_world_readable_tmpfiles = True` in ansible.cfg)
* Fedora 30 or later

The managed node cannot provide any other service on the same hostname as Pulp's API. The only
exception is Pulp 2. The RESP APIs for Pulp 2 and Pulp 3 can be served on the same hostname as
long as the `apache` webserver is deployed for both.

Ansibles Python interpreter must have the package installed:
* psycopg2
* firewall (if firewalld should be configured; you can disable that with `pulp_configure_firewall=false`)
Expand Down
12 changes: 8 additions & 4 deletions roles/pulp_webserver/templates/pulp-vhost.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ Define pulp-api {{ pulp_api_bind }}
ProxyRequests Off
ProxyPreserveHost Off

ProxyPass /pulp/api http://${pulp-api}/pulp/api
ProxyPassReverse /pulp/api http://${pulp-api}/pulp/api
ProxyPass /pulp/api/v3 http://${pulp-api}/pulp/api/v3
ProxyPassReverse /pulp/api/3 http://${pulp-api}/pulp/api/v3

ProxyPass /auth/login/ http://${pulp-api}/auth/login/
ProxyPassReverse /auth/login/ http://${pulp-api}/auth/login/
Expand All @@ -26,6 +26,8 @@ Define pulp-api {{ pulp_api_bind }}
IncludeOptional pulp/*.conf

# static files are served through whitenoise - http://whitenoise.evans.io/en/stable/
# exclude all pulp v2 api calls
ProxyPassMatch ^/pulp/api/v2 !
ProxyPass / http://${pulp-api}/
ProxyPassReverse / http://${pulp-api}/

Expand Down Expand Up @@ -65,8 +67,8 @@ Define pulp-api {{ pulp_api_bind }}
ProxyRequests Off
ProxyPreserveHost Off

ProxyPass /pulp/api http://${pulp-api}/pulp/api
ProxyPassReverse /pulp/api http://${pulp-api}/pulp/api
ProxyPass /pulp/api/v3 http://${pulp-api}/pulp/api/v3
ProxyPassReverse /pulp/api/v3 http://${pulp-api}/pulp/api/v3

ProxyPass /auth/login/ http://${pulp-api}/auth/login/
ProxyPassReverse /auth/login/ http://${pulp-api}/auth/login/
Expand All @@ -78,6 +80,8 @@ Define pulp-api {{ pulp_api_bind }}

# most pulp static files are served through whitenoise
# http://whitenoise.evans.io/en/stable/
# exclude all pulp v2 api calls
ProxyPassMatch ^/pulp/api/v2 !
ProxyPass / http://${pulp-api}/
ProxyPassReverse / http://${pulp-api}/

Expand Down

0 comments on commit ad530ca

Please sign in to comment.