56 LoadModule ssl_module libexec/64/mod_ssl.so |
56 LoadModule ssl_module libexec/64/mod_ssl.so |
57 LoadModule mime_module libexec/64/mod_mime.so |
57 LoadModule mime_module libexec/64/mod_mime.so |
58 LoadModule dir_module libexec/64/mod_dir.so |
58 LoadModule dir_module libexec/64/mod_dir.so |
59 LoadModule alias_module libexec/64/mod_alias.so |
59 LoadModule alias_module libexec/64/mod_alias.so |
60 LoadModule rewrite_module libexec/64/mod_rewrite.so |
60 LoadModule rewrite_module libexec/64/mod_rewrite.so |
61 |
|
62 LoadModule env_module libexec/64/mod_env.so |
61 LoadModule env_module libexec/64/mod_env.so |
63 LoadModule wsgi_module libexec/64/mod_wsgi-2.6.so |
62 LoadModule wsgi_module libexec/64/mod_wsgi-2.6.so |
|
63 |
64 # We only alias a specific script, not all files in ${sysrepo_template_dir} |
64 # We only alias a specific script, not all files in ${sysrepo_template_dir} |
65 WSGIScriptAlias /wsgi_p5p ${sysrepo_template_dir}/sysrepo_p5p.py |
65 WSGIScriptAlias /wsgi_p5p ${sysrepo_template_dir}/sysrepo_p5p.py |
66 WSGIDaemonProcess sysrepo processes=1 threads=21 user=pkg5srv group=pkg5srv display-name=pkg5_sysrepo inactivity-timeout=120 |
66 WSGIDaemonProcess sysrepo processes=1 threads=21 user=pkg5srv group=pkg5srv display-name=pkg5_sysrepo inactivity-timeout=120 |
67 WSGIProcessGroup sysrepo |
67 WSGIProcessGroup sysrepo |
68 WSGISocketPrefix ${sysrepo_runtime_dir}/wsgi |
68 WSGISocketPrefix ${sysrepo_runtime_dir}/wsgi |
380 </%doc> |
380 </%doc> |
381 <% |
381 <% |
382 # File and p5p-based repositories get our static |
382 # File and p5p-based repositories get our static |
383 # versions and publisher responses |
383 # versions and publisher responses |
384 context.write("RewriteRule ^/%(pub)s/%(hash)s/versions/0 " |
384 context.write("RewriteRule ^/%(pub)s/%(hash)s/versions/0 " |
385 "/versions/0/index.html [L,NE]\n" % locals()) |
385 "%%{DOCUMENT_ROOT}/versions/0/index.html [L,NE]\n" % locals()) |
386 context.write("RewriteRule ^/%(pub)s/%(hash)s/publisher/0 " |
386 context.write("RewriteRule ^/%(pub)s/%(hash)s/publisher/0 " |
387 "/%(pub)s/%(hash)s/publisher/0/index.html [L,NE]\n" % locals()) |
387 "%%{DOCUMENT_ROOT}/%(pub)s/%(hash)s/publisher/0/index.html [L,NE]\n" % locals()) |
388 # A p5p archive repository |
388 # A p5p archive repository |
389 if utype == "file": |
389 if utype == "file": |
390 repo_path = "/%s" % uri.replace("file:", "").lstrip("/") |
390 repo_path = "/%s" % uri.replace("file:", "").lstrip("/") |
391 context.write("# %s %s\n" % (uri, hash)) |
391 context.write("# %s %s\n" % (uri, hash)) |
392 # We 'passthrough' (PT), letting our |
392 # We 'passthrough' (PT), letting our |
443 |
443 |
444 context.write("RewriteRule ^GET\ " |
444 context.write("RewriteRule ^GET\ " |
445 "/%(pub)s/%(hash)s/manifest/0/([^@]+)@([^\ ]+)(\ HTTP/1.1)$ " |
445 "/%(pub)s/%(hash)s/manifest/0/([^@]+)@([^\ ]+)(\ HTTP/1.1)$ " |
446 "/%(pub)s/%(hash)s/publisher/%(pub)s/pkg/$1/$2 [NE,PT,C]\n" |
446 "/%(pub)s/%(hash)s/publisher/%(pub)s/pkg/$1/$2 [NE,PT,C]\n" |
447 % locals()) |
447 % locals()) |
448 context.write("RewriteRule ^/%(pub)s/%(hash)s/(.*)$ - [NE,L]" |
448 context.write("RewriteRule ^/%(pub)s/%(hash)s/(.*)$ %%{DOCUMENT_ROOT}/%(pub)s/%(hash)s/$1 [NE,L]" |
449 % locals()) |
449 % locals()) |
450 %> |
450 %> |
451 % else: |
451 % else: |
452 <% context.write("RewriteRule ^proxy:%(uri)s/(.*)$ " |
452 <% context.write("RewriteRule ^proxy:%(uri)s/(.*)$ " |
453 "%(uri)s/$1 [NE,P]" % locals()) |
453 "%(uri)s/$1 [NE,P]" % locals()) |
491 % if uri.startswith("http"): |
491 % if uri.startswith("http"): |
492 <% context.write("ProxyPass / %s retry=0" % uri) %> |
492 <% context.write("ProxyPass / %s retry=0" % uri) %> |
493 % endif |
493 % endif |
494 % endfor uri |
494 % endfor uri |
495 |
495 |
496 # any non-file-based repositories get our local versions and syspub responses |
496 # any repositories get our local versions and syspub responses |
497 RewriteRule ^.*/versions/0/?$ - [L] |
497 RewriteRule ^.*/versions/0/?$ %{DOCUMENT_ROOT}/versions/0/index.html [L] |
498 RewriteRule ^.*/syspub/0/?$ - [L] |
498 RewriteRule ^.*/syspub/0/?$ %{DOCUMENT_ROOT}/syspub/0/index.html [L] |
499 # allow for 'OPTIONS * HTTP/1.0' requests |
499 # allow for 'OPTIONS * HTTP/1.0' requests |
500 RewriteCond %{REQUEST_METHOD} OPTIONS [NC] |
500 RewriteCond %{REQUEST_METHOD} OPTIONS [NC] |
501 RewriteRule \* - [L] |
501 RewriteRule \* - [L] |
502 # catch all, denying everything |
502 # catch all, denying everything |
503 RewriteRule ^.*$ - [R=404] |
503 RewriteRule ^.*$ - [R=404] |