Project

Profile

Help

Task #1182

Updated by jortel@redhat.com about 9 years ago

Update /etc/httpd/conf.d/pulp_rpm.conf In "the pulp_rpm.conf file":https://github.com/pulp/pulp_rpm/blob/master/plugins/etc/httpd/conf.d/pulp_rpm.conf, add the ErrorDocument directive to each Directory entry which serves content units. The ErrorDocument directives specifically need to be for 404 requests and replace Alias and <Directory/> have them handled by /pulp/api/v2/content/redirect. These new ErrorDocument directives with a <Location/> directive.    should be uncommented by default. This causes will cause the content GET request units to be directed to give the /pulp/content endpoint which performs authorization and redirect platform an opportunity to respond before having a generic 404 returned. Here is an example of one of the streamer as needed. 


 Exampple:  

 ErrorDocument directives. 

 <pre> 
 # -- HTTPS Repositories --------- ErrorDocument 404 /pulp/api/v2/content/redirect/ 
 Alias /pulp/repos /var/www/pub/yum/https/repos 

 <Directory /var/www/pub/yum/https> 
     WSGIAccessScript /srv/pulp/repo_auth.wsgi 
     SSLRequireSSL 
     SSLVerifyClient optional_no_ca 
     SSLVerifyDepth 2 
     SSLOptions +StdEnvVars +ExportCertData +FakeBasicAuth 
     Options FollowSymLinks Indexes 
 </Directory> 
 </pre> 

 Changed to: 

 <pre> 
 <Location /pulp/repos/> 
     RewriteEngine On 
     RewriteRule (.+/pulp/repos/)(.+) /pulp/content/var/www/pub/yum/https/repos/$2 
     SSLRequireSSL 
     SSLVerifyClient optional_no_ca 
     SSLVerifyDepth 2 
     SSLOptions +StdEnvVars +ExportCertData +FakeBasicAuth 
 </Location> 
 </pre> 
 Also add a release note about this change that to have a content type use lazy repo support this is required.

Back