summaryrefslogtreecommitdiffstats
path: root/server/setup/05-service-settings/etc/apache2
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2019-04-14 06:35:18 +0200
committerSven Gothel <[email protected]>2019-04-14 06:35:18 +0200
commit3529ab653332b31f1661e8a8debea5a2b98c7797 (patch)
tree22f54e511ff21e5652b64309d4aa88b1cc413a8e /server/setup/05-service-settings/etc/apache2
parent13c66e6994a4c5176dd06ba71e7cfe75ce7e32f5 (diff)
apache2: +suexec + fcgid, gitweb -> cgit incl RewriteRules ..
Diffstat (limited to 'server/setup/05-service-settings/etc/apache2')
-rw-r--r--server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel.conf239
-rw-r--r--server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel_ssl.conf239
-rw-r--r--server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit.conf238
-rw-r--r--server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org-ssl.conf81
-rw-r--r--server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org.conf190
5 files changed, 821 insertions, 166 deletions
diff --git a/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel.conf b/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel.conf
new file mode 100644
index 0000000..fa9f533
--- /dev/null
+++ b/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel.conf
@@ -0,0 +1,239 @@
+ # Source: https://git.ao2.it/gitweb_cgit_migration.git
+ #
+ # Redirects mapping gitweb -> cgit
+ # Inspired from: http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired
+ #
+ # Gitweb uses get targets seperated by ;
+ #
+ # /?...;...;...
+ #
+ # p = Project
+ # a = Action like (
+ # blob,
+ # blob_plain,
+ # commitdiff,
+ # commit,
+ # history,
+ # log,
+ # rss|atom,
+ # shortlog,
+ # summary,
+ # tag,
+ # tree,
+ # snapshot
+ # )
+ # h = SHA Hash
+ # hb= SHA Hash Tree Base
+ # f= file/dir
+ # sf= snapshot format
+ #
+ # Cgit uses the following:
+ #
+ # /project/action/?...
+ #
+ # action ( commit, log, diff, tree, tag, patch )
+ #
+ # id = SHA Hash
+ # id2 = SHA Hash
+ # h = head
+ #
+ # Translation rules
+ #
+ # Project is a straight redirect
+ # ---
+ # /?p=(.+)\.git; http://%{SERVER_NAME}/$1/
+ #
+ # Action requires a mapping
+ # ---
+ # a=(blob|tree) /tree/
+ # a=(blobdiff|commitdiff) /diff/
+ # a=commit /commit/
+ # a=(summary) /
+ # a=(shortlog|log|history) /log/
+ # a=tag /tag/
+ # a=blob_plain /blob/
+ # a=rss|atom /atom
+ #
+ # Targets require mapping
+ # ---
+ # h=(.+) id=$1
+ # f=(.+) /$1
+ # hb=(.+) id2=$1
+ #
+ # Now putting it all together
+ #
+ # Changed to must match URI '/git/' using all gitweb details in the query!
+ # Allowing to re-use /git/ for cgit, however we use /cgit/ as target for efficiency
+ #
+ RewriteEngine On
+ #RewriteLog /tmp/rewrite.log
+ #RewriteLogLevel 5
+
+ # blob
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%5?id=%3;id2=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%5 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3 [R,L,NE]
+
+ # tree
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%5?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%5 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;f=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/? [R,L,NE]
+
+ # commitdiff
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blobdiff;h=(.+);hp=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/diff/%6?id2=%4;id=%3;id3=%5 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+);hp=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/diff/?id=%4;id2=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/diff/?id=%3 [R,L,NE]
+
+ # commit
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=commit;h=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/commit/?id=%3 [R,L,NE]
+
+ # summary
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=summary
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/? [R,L,NE]
+
+ # shortlog
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=shortlog;h=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=shortlog
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/? [R,L,NE]
+
+ # log
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=log;h=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=log
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log? [R,L,NE]
+
+ # history
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/%5?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/%3?id=%4;id2=%5 [R,L,NE]
+
+ #RewriteBase "/git/"
+ #RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+):/(.+)
+ #RewriteRule ^.*$ http://cgit.openezx.org/%1.git/log/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+)
+ RewriteRule ^.*$ http://cgit.openezx.org/%1.git/log/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ # tag
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=refs/tags/(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tag/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/tag/?id=%3 [R,L,NE]
+
+ # blob_plain
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;h=(.+);f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/plain/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+);hb=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/plain/%3?id2=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/plain/%3 [R,L,NE]
+
+ # rss|atom
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom);h=refsheads/(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/atom?h=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/atom? [R,L,NE]
+
+ # snapshot
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=snapshot;h=(.+);sf=(.+)
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/snapshot/%3.tar.gz [R,L,NE]
+
+ # Fail safes incase nothing above matches, try at least to put the person in the project
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)\.git.*
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/%1.git/? [R,L,NE]
+
+ # Or else in the root of cgit
+ RewriteBase "/git/"
+ RewriteRule ^.*$ http://%{SERVER_NAME}/cgit/ [R,L,NE]
diff --git a/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel_ssl.conf b/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel_ssl.conf
new file mode 100644
index 0000000..7d9b192
--- /dev/null
+++ b/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit-rel_ssl.conf
@@ -0,0 +1,239 @@
+ # Source: https://git.ao2.it/gitweb_cgit_migration.git
+ #
+ # Redirects mapping gitweb -> cgit
+ # Inspired from: http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired
+ #
+ # Gitweb uses get targets seperated by ;
+ #
+ # /?...;...;...
+ #
+ # p = Project
+ # a = Action like (
+ # blob,
+ # blob_plain,
+ # commitdiff,
+ # commit,
+ # history,
+ # log,
+ # rss|atom,
+ # shortlog,
+ # summary,
+ # tag,
+ # tree,
+ # snapshot
+ # )
+ # h = SHA Hash
+ # hb= SHA Hash Tree Base
+ # f= file/dir
+ # sf= snapshot format
+ #
+ # Cgit uses the following:
+ #
+ # /project/action/?...
+ #
+ # action ( commit, log, diff, tree, tag, patch )
+ #
+ # id = SHA Hash
+ # id2 = SHA Hash
+ # h = head
+ #
+ # Translation rules
+ #
+ # Project is a straight redirect
+ # ---
+ # /?p=(.+)\.git; https://%{SERVER_NAME}/$1/
+ #
+ # Action requires a mapping
+ # ---
+ # a=(blob|tree) /tree/
+ # a=(blobdiff|commitdiff) /diff/
+ # a=commit /commit/
+ # a=(summary) /
+ # a=(shortlog|log|history) /log/
+ # a=tag /tag/
+ # a=blob_plain /blob/
+ # a=rss|atom /atom
+ #
+ # Targets require mapping
+ # ---
+ # h=(.+) id=$1
+ # f=(.+) /$1
+ # hb=(.+) id2=$1
+ #
+ # Now putting it all together
+ #
+ # Changed to must match URI '/git/' using all gitweb details in the query!
+ # Allowing to re-use /git/ for cgit, however we use /cgit/ as target for efficiency
+ #
+ RewriteEngine On
+ #RewriteLog /tmp/rewrite.log
+ #RewriteLogLevel 5
+
+ # blob
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%5?id=%3;id2=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%5 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%3 [R,L,NE]
+
+ # tree
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%5?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%5 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;f=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tree/? [R,L,NE]
+
+ # commitdiff
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blobdiff;h=(.+);hp=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/diff/%6?id2=%4;id=%3;id3=%5 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+);hp=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/diff/?id=%4;id2=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/diff/?id=%3 [R,L,NE]
+
+ # commit
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=commit;h=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/commit/?id=%3 [R,L,NE]
+
+ # summary
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=summary
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/? [R,L,NE]
+
+ # shortlog
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=shortlog;h=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=shortlog
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/? [R,L,NE]
+
+ # log
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=log;h=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=log
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log? [R,L,NE]
+
+ # history
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/%5?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/%3?id=%4;id2=%5 [R,L,NE]
+
+ #RewriteBase "/git/"
+ #RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+):/(.+)
+ #RewriteRule ^.*$ https://cgit.openezx.org/%1.git/log/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+)
+ RewriteRule ^.*$ https://cgit.openezx.org/%1.git/log/%3?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/?id=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ # tag
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=refs/tags/(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tag/?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/tag/?id=%3 [R,L,NE]
+
+ # blob_plain
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;h=(.+);f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/plain/%4?id=%3 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+);hb=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/plain/%3?id2=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/plain/%3 [R,L,NE]
+
+ # rss|atom
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom);h=refsheads/(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/atom?h=%4 [R,L,NE]
+
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/atom? [R,L,NE]
+
+ # snapshot
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)(\.git);a=snapshot;h=(.+);sf=(.+)
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/snapshot/%3.tar.gz [R,L,NE]
+
+ # Fail safes incase nothing above matches, try at least to put the person in the project
+ RewriteBase "/git/"
+ RewriteCond %{query_string} p=(.+)\.git.*
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/%1.git/? [R,L,NE]
+
+ # Or else in the root of cgit
+ RewriteBase "/git/"
+ RewriteRule ^.*$ https://%{SERVER_NAME}/cgit/ [R,L,NE]
diff --git a/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit.conf b/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit.conf
new file mode 100644
index 0000000..20f792a
--- /dev/null
+++ b/server/setup/05-service-settings/etc/apache2/sites-available/gitweb-to-cgit.conf
@@ -0,0 +1,238 @@
+ # Source: https://git.ao2.it/gitweb_cgit_migration.git
+ #
+ # Redirects mapping gitweb -> cgit
+ # Inspired from: http://www.clearchain.com/blog/posts/cgit-upgrade-gitweb-retired
+ #
+ # Gitweb uses get targets seperated by ;
+ #
+ # /?...;...;...
+ #
+ # p = Project
+ # a = Action like (
+ # blob,
+ # blob_plain,
+ # commitdiff,
+ # commit,
+ # history,
+ # log,
+ # rss|atom,
+ # shortlog,
+ # summary,
+ # tag,
+ # tree,
+ # snapshot
+ # )
+ # h = SHA Hash
+ # hb= SHA Hash Tree Base
+ # f= file/dir
+ # sf= snapshot format
+ #
+ # Cgit uses the following:
+ #
+ # /project/action/?...
+ #
+ # action ( commit, log, diff, tree, tag, patch )
+ #
+ # id = SHA Hash
+ # id2 = SHA Hash
+ # h = head
+ #
+ # Translation rules
+ #
+ # Project is a straight redirect
+ # ---
+ # /?p=(.+)\.git; http://%{SERVER_NAME}/$1/
+ #
+ # Action requires a mapping
+ # ---
+ # a=(blob|tree) /tree/
+ # a=(blobdiff|commitdiff) /diff/
+ # a=commit /commit/
+ # a=(summary) /
+ # a=(shortlog|log|history) /log/
+ # a=tag /tag/
+ # a=blob_plain /blob/
+ # a=rss|atom /atom
+ #
+ # Targets require mapping
+ # ---
+ # h=(.+) id=$1
+ # f=(.+) /$1
+ # hb=(.+) id2=$1
+ #
+ # Now putting it all together
+ #
+ # Changed to must match URI '/git/' using all gitweb details in the query!
+ # Allowing to re-use /git/ for cgit, however we use /cgit/ as target for efficiency
+ #
+ RewriteEngine On
+ #RewriteLog /tmp/rewrite.log
+ #RewriteLogLevel 5
+
+ # blob
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%5?id=%3;id2=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%5 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+);h=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob;f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3 [R,L,NE]
+
+ # tree
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%5?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%4?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%5 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;f=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/%3?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;h=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree;hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tree
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tree/? [R,L,NE]
+
+ # commitdiff
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blobdiff;h=(.+);hp=(.+);hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/diff/%6?id2=%4;id=%3;id3=%5 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+);hp=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/diff/?id=%4;id2=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=commitdiff;h=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/diff/?id=%3 [R,L,NE]
+
+ # commit
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=commit;h=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/commit/?id=%3 [R,L,NE]
+
+ # summary
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=summary
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/? [R,L,NE]
+
+ # shortlog
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=shortlog;h=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=shortlog
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/? [R,L,NE]
+
+ # log
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=log;h=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=log
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log? [R,L,NE]
+
+ # history
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/%5?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/%3?id=%4;id2=%5 [R,L,NE]
+
+ #RewriteCond %{REQUEST_URI} /(.+)(\.git)/history/(.+):/(.+)
+ #RewriteRule ^/.*$ http://cgit.openezx.org/%1.git/log/%4?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;f=(.+);h=(.+)
+ RewriteRule ^/.*$ http://cgit.openezx.org/%1.git/log/%3?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;h=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/%4?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=history;hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/log/?id=%3 [R,L,NE]
+
+ # tag
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=refs/tags/(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tag/?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=tag;h=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/tag/?id=%3 [R,L,NE]
+
+ # blob_plain
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;h=(.+);f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/plain/%4?id=%3 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+);hb=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/plain/%3?id2=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=blob_plain;f=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/plain/%3 [R,L,NE]
+
+ # rss|atom
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom);h=refsheads/(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/atom?h=%4 [R,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=(rss|atom)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/atom? [R,L,NE]
+
+ # snapshot
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)(\.git);a=snapshot;h=(.+);sf=(.+)
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/snapshot/%3.tar.gz [R,L,NE]
+
+ # Fail safes incase nothing above matches, try at least to put the person in the project
+ RewriteCond %{REQUEST_URI} ^/git/$
+ RewriteCond %{query_string} p=(.+)\.git.*
+ RewriteRule ^/.*$ http://%{SERVER_NAME}/cgit/%1.git/? [R,L,NE]
+
+ # Or else in the root of cgit
+ #RewriteCond %{REQUEST_URI} ^/git/$
+ #RewriteRule ^.* http://%{SERVER_NAME}/cgit/ [R,L,NE]
diff --git a/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org-ssl.conf b/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org-ssl.conf
index 5bdcbf9..de8ce37 100644
--- a/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org-ssl.conf
+++ b/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org-ssl.conf
@@ -3,7 +3,9 @@
# General setup for the virtual host, inherited from global configuration
ServerName jogamp.org
+ ServerAlias www.jogamp.org
ServerPath /jogamp.org/
+ SuexecUserGroup webrunner webrunner
RewriteEngine On
DocumentRoot /srv/www/jogamp.org
@@ -48,8 +50,8 @@
# SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem
# SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
- SSLCertificateFile /etc/ssl/local/jogamp2016b-hostcert.pem
- SSLCertificateKeyFile /etc/ssl/local/jogamp2016b-hostkey.apache.pem
+ SSLCertificateFile /etc/ssl/local/jogamp2020a.org.crt.pem
+ SSLCertificateKeyFile /etc/ssl/local/jogamp2020a.org.key.apache.pem
# Server Certificate Chain:
# Point SSLCertificateChainFile at a file containing the
@@ -189,10 +191,14 @@
Require all granted
</Directory>
-# ScriptAlias /cgi-bin/ "/srv/www/jogamp.org/bugzilla"
+ <Directory "/srv/www/jogamp.org/wiki">
+ Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ AllowOverride All
+ Require all granted
+ AddHandler fcgid-script .php
+ FcgidWrapper /srv/www/scripts/php7.0-wrapper .php
+ </Directory>
- #PerlSwitches -w -T
- #PerlConfigRequire /srv/www/jogamp.org/bugzilla/mod_perl.pl
<Directory /srv/www/jogamp.org/bugzilla>
AddHandler cgi-script .cgi
Options +Indexes +ExecCGI -MultiViews +FollowSymLinks
@@ -200,20 +206,32 @@
AllowOverride Limit FileInfo AuthConfig Indexes Options
</Directory>
- SetEnv GIT_PROJECT_ROOT /srv/scm
- SetEnv GIT_HTTP_EXPORT_ALL
- ScriptAlias /srv/scm/ /usr/lib/git-core/git-http-backend/
- <Directory "/srv/www/jogamp.org/git">
- DirectoryIndex gitweb.cgi
- AllowOverride all
- #Order allow,deny
- #Allow from all
+ #SetEnv GIT_PROJECT_ROOT /srv/scm
+ #SetEnv GIT_HTTP_EXPORT_ALL
+ #ScriptAlias /srv/scm/ /usr/lib/git-core/git-http-backend/
+ #<Directory "/srv/www/jogamp.org/git">
+ # DirectoryIndex gitweb.cgi
+ # AllowOverride all
+ # #Order allow,deny
+ # #Allow from all
+ # Require all granted
+ # Options ExecCGI
+ # <Files gitweb.cgi>
+ # SetHandler cgi-script
+ # </Files>
+ # SetEnv GITWEB_CONFIG /srv/scm/gitweb.conf
+ #</Directory>
+
+ ScriptAlias /cgit/ "/srv/www/cgit/cgit.cgi/"
+ #RedirectMatch ^/cgit$ /cgit/
+ Alias /cgit-css "/usr/share/cgit/"
+ <Directory "/srv/www/cgit/">
+ AllowOverride None
+ Options ExecCGI FollowSymlinks
Require all granted
- Options ExecCGI
- <Files gitweb.cgi>
- SetHandler cgi-script
- </Files>
- SetEnv GITWEB_CONFIG /srv/scm/gitweb.conf
+ </Directory>
+ <Directory "/srv/www/jogamp.org/git">
+ Include sites-available/gitweb-to-cgit-rel_ssl.conf
</Directory>
Alias /icons/ "/srv/www/jogamp.org/icons/"
@@ -254,28 +272,15 @@
# </Location>
Header edit Location ^http://jogamp.org/chuck/ https://jogamp.org/chuck/
-</VirtualHost>
-
-<VirtualHost *:443>
- ServerName jogamp.com
- ServerAlias *.jogamp.com
- ServerPath /jogamp.org/
- SSLEngine on
- ErrorLog ${APACHE_LOG_DIR}/jogamp.com-ssl-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.com-ssl-access.log combined
-
- SSLCertificateFile /etc/ssl/local/jogamp2016a-hostcert.pem
- SSLCertificateKeyFile /etc/ssl/local/jogamp2016a-hostkey.apache.pem
- SSLCertificateChainFile /etc/ssl/local/thawte-ca-cert3-20151105.pem
-
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^www.jogamp\.com$ [NC]
+ RewriteCond %{HTTP_HOST} ^www\.jogamp\.org$ [NC]
RewriteRule ^/(.*)$ https://jogamp.org/$1 [R=301,L,NE]
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.com$ [NC]
+ RewriteCond %{HTTP_HOST} ^scm\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ https://jogamp.org/git/$1 [R=301,L,NE]
+
+ RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
RewriteRule ^/(.*)$ https://jogamp.org/%1/$1 [R=301,L,NE]
+</VirtualHost>
- RewriteCond %{HTTP_HOST} ^jogamp\.com$ [NC]
- RewriteRule ^/(.*)$ https://jogamp.org/$1 [R=301,L,NE]
-</VirtualHost>
+</IfModule>
diff --git a/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org.conf b/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org.conf
index f40a8eb..155cf84 100644
--- a/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org.conf
+++ b/server/setup/05-service-settings/etc/apache2/sites-available/jogamp_org.conf
@@ -6,8 +6,9 @@
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName jogamp.org
- ServerAlias www.jogamp.org
+ ServerAlias *.jogamp.org
ServerPath /jogamp.org/
+ SuexecUserGroup webrunner webrunner
RewriteEngine On
ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
@@ -32,38 +33,40 @@
Require all granted
</Directory>
- RewriteCond %{HTTP_HOST} ^www.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/$1 [R=301,L,NE]
-
- #RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- #RewriteRule ^/(.*)$ http://jogamp.org/%1/$1 [R=301,L,NE]
-
- RewriteCond %{REQUEST_URI} ^/wiki/index.php$
- RewriteCond %{QUERY_STRING} ^title=Special:UserLogin
- RewriteCond %{REQUEST_METHOD} ^GET$
- RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L,NE]
-
- #
- # Due to security concerns, session hijacking .. etc .. the whole
- # bugzilla stream will go over https
- #
- RewriteCond %{REQUEST_URI} ^/bugzilla
- RewriteRule ^/bugzilla/(.*)$ https://%{SERVER_NAME}/bugzilla/$1 [R=301,L,NE]
+ <Directory "/srv/www/jogamp.org/wiki">
+ Options +Indexes +ExecCGI -MultiViews +SymLinksIfOwnerMatch
+ AllowOverride All
+ Require all granted
+ AddHandler fcgid-script .php
+ FcgidWrapper /srv/www/scripts/php7.0-wrapper .php
+ </Directory>
- SetEnv GIT_PROJECT_ROOT /srv/scm
- SetEnv GIT_HTTP_EXPORT_ALL
- ScriptAlias /srv/scm/ /usr/lib/git-core/git-http-backend/
- <Directory "/srv/www/jogamp.org/git">
- DirectoryIndex gitweb.cgi
- AllowOverride all
- #Order allow,deny
- #Allow from all
+ #SetEnv GIT_PROJECT_ROOT /srv/scm
+ #SetEnv GIT_HTTP_EXPORT_ALL
+ #ScriptAlias /srv/scm/ /usr/lib/git-core/git-http-backend/
+ #<Directory "/srv/www/jogamp.org/git">
+ # DirectoryIndex gitweb.cgi
+ # AllowOverride all
+ # #Order allow,deny
+ # #Allow from all
+ # Require all granted
+ # Options ExecCGI
+ # <Files gitweb.cgi>
+ # SetHandler cgi-script
+ # </Files>
+ # SetEnv GITWEB_CONFIG /srv/scm/gitweb.conf
+ #</Directory>
+
+ ScriptAlias /cgit/ "/srv/www/cgit/cgit.cgi/"
+ #RedirectMatch ^/cgit$ /cgit/
+ Alias /cgit-css "/usr/share/cgit/"
+ <Directory "/srv/www/cgit/">
+ AllowOverride None
+ Options ExecCGI FollowSymlinks
Require all granted
- Options ExecCGI
- <Files gitweb.cgi>
- SetHandler cgi-script
- </Files>
- SetEnv GITWEB_CONFIG /srv/scm/gitweb.conf
+ </Directory>
+ <Directory "/srv/www/jogamp.org/git">
+ Include sites-available/gitweb-to-cgit-rel.conf
</Directory>
Alias /icons/ "/srv/www/jogamp.org/icons/"
@@ -78,6 +81,18 @@
#
# Due to security concerns, session hijacking .. etc .. the whole
+ # bugzilla stream will go over https
+ #
+ RewriteCond %{REQUEST_URI} ^/wiki/index.php$
+ RewriteCond %{QUERY_STRING} ^title=Special:UserLogin
+ RewriteCond %{REQUEST_METHOD} ^GET$
+ RewriteRule ^(.*)$ https://%{SERVER_NAME}/$1 [R=301,L,NE]
+
+ RewriteCond %{REQUEST_URI} ^/bugzilla
+ RewriteRule ^/bugzilla/(.*)$ https://%{SERVER_NAME}/bugzilla/$1 [R=301,L,NE]
+
+ #
+ # Due to security concerns, session hijacking .. etc .. the whole
# hudson and bugzilla stream will go over https
#
RewriteCond %{REQUEST_URI} ^/chuck
@@ -123,114 +138,33 @@
#</Proxy>
#ProxyPass /chuck http://localhost:8080/chuck
#ProxyPassReverse /chuck http://localhost:8080/chuck
-</VirtualHost>
-
-<VirtualHost *:80>
- ServerName blog.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/%1/$1 [R=301,L,NE]
-</VirtualHost>
-<VirtualHost *:80>
- ServerName bugzilla.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ https://jogamp.org/%1/$1 [R=301,L,NE]
-</VirtualHost>
-
-<VirtualHost *:80>
- ServerName wiki.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/%1/$1 [R=301,L,NE]
-</VirtualHost>
+ RewriteCond %{HTTP_HOST} ^www\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ http://jogamp.org/$1 [R=301,L,NE]
-<VirtualHost *:80>
- ServerName scm.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
+ RewriteCond %{HTTP_HOST} ^scm\.jogamp\.org$ [NC]
RewriteRule ^/(.*)$ http://jogamp.org/git/$1 [R=301,L,NE]
-</VirtualHost>
-<VirtualHost *:80>
- ServerName jogl.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/%1/www/$1 [R=301,L,NE]
-</VirtualHost>
+ RewriteCond %{HTTP_HOST} ^joal\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ http://jogamp.org/joal/www/$1 [R=301,L,NE]
-<VirtualHost *:80>
- ServerName jocl.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/%1/www/$1 [R=301,L,NE]
-</VirtualHost>
+ RewriteCond %{HTTP_HOST} ^jogl\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ http://jogamp.org/jogl/www/$1 [R=301,L,NE]
-<VirtualHost *:80>
- ServerName joal.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/%1/www/$1 [R=301,L,NE]
-</VirtualHost>
+ RewriteCond %{HTTP_HOST} ^jocl\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ http://jogamp.org/jocl/www/$1 [R=301,L,NE]
-<VirtualHost *:80>
- ServerName demos.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/%1/$1 [R=301,L,NE]
-</VirtualHost>
-
-<VirtualHost *:80>
- ServerName chuck.jogamp.org
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.org-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.org-access.log combined
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
- RewriteRule ^/(.*)$ https://jogamp.org/%1/$1 [R=301,L,NE]
-</VirtualHost>
+ RewriteCond %{HTTP_HOST} ^demos\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ http://jogamp.org/jogl-demos/www/$1 [R=301,L,NE]
-<VirtualHost *:80>
- ServerName jogamp.com
- ServerAlias *.jogamp.com
- ServerPath /jogamp.org/
- ErrorLog ${APACHE_LOG_DIR}/jogamp.com-error.log
- CustomLog ${APACHE_LOG_DIR}/jogamp.com-access.log combined
+ RewriteCond %{HTTP_HOST} ^bugzilla\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ https://jogamp.org/bugzilla/$1 [R=301,L,NE]
- RewriteEngine On
- RewriteCond %{HTTP_HOST} ^www.jogamp\.com$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/$1 [R=301,L,NE]
+ RewriteCond %{HTTP_HOST} ^chuck\.jogamp\.org$ [NC]
+ RewriteRule ^/(.*)$ https://jogamp.org/chuck/$1 [R=301,L,NE]
- RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.com$ [NC]
+ RewriteCond %{HTTP_HOST} ^(.*)\.jogamp\.org$ [NC]
RewriteRule ^/(.*)$ http://jogamp.org/%1/$1 [R=301,L,NE]
-
- RewriteCond %{HTTP_HOST} ^jogamp\.com$ [NC]
- RewriteRule ^/(.*)$ http://jogamp.org/$1 [R=301,L,NE]
</VirtualHost>
#