Project

Profile

Help

Issue #2288 » pulp_puppet.conf

jreitmayer, 10/07/2016 06:27 PM

 
# Copyright © 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a copy of GPLv2
# along with this software; if not, see
# http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt.
#
# Red Hat trademarks are not licensed under GPLv2. No permission is
# granted to use or replicate Red Hat trademarks that are incorporated
# in this software or its documentation.

#
# Apache configuration file for Pulp's Puppet support
#

# -- HTTPS Repositories ---------

Alias /pulp/puppet /var/www/pub/puppet/https/repos

<Directory /var/www/pub/puppet/https/repos>
Options FollowSymLinks Indexes
</Directory>

# -- HTTP Repositories ----------

<Directory /var/www/pub/puppet/http/repos>
Options FollowSymLinks Indexes
</Directory>

# -- Files Repositories ----------

Alias /pulp/puppet_files /var/www/pub/puppet/files

<Directory /var/www/pub/puppet/files>
SSLRequireSSL
SSLVerifyClient optional_no_ca
SSLVerifyDepth 2
SSLOptions +StdEnvVars +ExportCertData +FakeBasicAuth
Options FollowSymLinks Indexes
</Directory>

# The puppet module tool does url joins improperly. When we send it a path to a
# file like "/pulp/puppet/demo/system/releases/p/puppetlabs/puppetlabs-stdlib-3.1.0.tar.gz",
# it treats that like a relative path instead of absolute. The following redirect
# compensates for this. The only path that should be available under
# /pulp_puppet/forge/ is /pulp_puppet/forge/<consumer|repository>/consumer_id|repo_id>/api/v1/releases.json
# and so the following redirect will match any path that isn't the above.
RedirectMatch ^\/?pulp_puppet\/forge\/[^\/]+\/[^\/]+\/(?!api\/v1\/releases\.json)(.*)$ /$1

# for puppet < 3.3
WSGIScriptAlias /api/v1 /srv/pulp/puppet_forge_pre33_api.wsgi
# for puppet >= 3.3
WSGIScriptAlias /pulp_puppet/forge /srv/pulp/puppet_forge_post33_api.wsgi
WSGIPassAuthorization On
(8-8/9)