xaizek / rocketgit (License: AGPLv3+) (since 2018-12-09)
Light and fast Git hosting solution suitable to serve both as a hub or as a personal code storage with its tickets, pull requests, API and much more.
Commit a030309a796a84b99bc9568fe81291305492bf10

Apache sample config fixes
Author: Catalin(ux) M. BOIE
Author date (UTC): 2017-06-25 07:59
Committer name: Catalin(ux) M. BOIE
Committer date (UTC): 2017-06-25 07:59
Parent(s): 45797dbaf71ec5c922a8ed6e7b9497da64807eb4
Signing key:
Tree: 1f3716d0a876945b0bb405bdf8f2e9dd4aa522da
File Lines added Lines deleted
samples/rg.conf 13 20
File samples/rg.conf changed (mode: 100644) (index c984617..b07b51b)
13 13 # Cache at will # Cache at will
14 14 <FilesMatch "(?i)^.*\.(ico|jpg|jpeg|png|gif|js|css)$"> <FilesMatch "(?i)^.*\.(ico|jpg|jpeg|png|gif|js|css)$">
15 15 FileETag MTime Size FileETag MTime Size
16 <IfModule mod_expires.c>
17 ExpiresActive On
18 ExpiresDefault "access plus 1 day"
19 </IfModule>
16 20 </FilesMatch> </FilesMatch>
17
18 <IfModule mod_expires.c>
19 ExpiresActive On
20 ExpiresByType image/vnd.microsoft.icon "access plus 7 days"
21 ExpiresByType image/png "access plus 1 day"
22 ExpiresByType text/css "access plus 1 day"
23 ExpiresByType text/javascript "access plus 1 day"
24 ExpiresByType application/javascript "access plus 1 day"
25 ExpiresByType application/x-javascript "access plus 1 day"
26 </IfModule>
27 21 </Directory> </Directory>
28 22
29 23 <VirtualHost *:80> <VirtualHost *:80>
30 24 # Set ServerName correctly, else, this VirtualHost will not match # Set ServerName correctly, else, this VirtualHost will not match
31 25 #ServerName rg.domain.tld #ServerName rg.domain.tld
32 #ServerAlias rg www.rg.domain.tld
26 #ServerAlias rg www.rg.domain.tld x.domain.tld y.domain.tld
33 27
34 28 DocumentRoot /usr/share/rocketgit/root/ DocumentRoot /usr/share/rocketgit/root/
35 29 ErrorLog logs/rocketgit-error_log ErrorLog logs/rocketgit-error_log
36 CustomLog logs/rocketgit-access_log common
30 CustomLog logs/rocketgit-access_log combined
37 31
38 32 KeepAlive On KeepAlive On
39 33 MaxKeepAliveRequests 1000 MaxKeepAliveRequests 1000
 
42 36 ServerSignature Off ServerSignature Off
43 37 UseCanonicalName On UseCanonicalName On
44 38 UseCanonicalPhysicalPort On UseCanonicalPhysicalPort On
39 LogLevel info
45 40
46 41 RewriteEngine On RewriteEngine On
42 #LogLevel rewrite:trace8
47 43
48 44 # Allow .ico, 'themes' folder and robots.txt # Allow .ico, 'themes' folder and robots.txt
49 45 # Also, avoid scripts that are looking for exploits # Also, avoid scripts that are looking for exploits
 
52 48
53 49 # Force the use of only one name even if we have more aliases. # Force the use of only one name even if we have more aliases.
54 50 # https://httpd.apache.org/docs/2.4/rewrite/remapping.html # https://httpd.apache.org/docs/2.4/rewrite/remapping.html
55 #RewriteCond "%{HTTP_HOST}" "!^%{SERVER_NAME}$" [nocase,ornext]
56 #RewriteCond "%{HTTP_PORT}" "!^%{SERVER_PORT}$" [nocase]
51 #RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}"
57 52 #RewriteRule "^/?(.*)" "http://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] #RewriteRule "^/?(.*)" "http://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape]
58 53
59 54 # all rest # all rest
 
75 70 </VirtualHost> </VirtualHost>
76 71
77 72 <VirtualHost *:443> <VirtualHost *:443>
78 #LogLevel debug #rewrite:trace8
79 73 # Set ServerName correctly, else, this VirtualHost will not match # Set ServerName correctly, else, this VirtualHost will not match
80 74 #ServerName rg.domain.tld #ServerName rg.domain.tld
81 75 #ServerAlias rg www.rg.domain.tld #ServerAlias rg www.rg.domain.tld
82 76
83 77 DocumentRoot /usr/share/rocketgit/root/ DocumentRoot /usr/share/rocketgit/root/
84 78 ErrorLog logs/rocketgit-ssl_error_log ErrorLog logs/rocketgit-ssl_error_log
85 CustomLog logs/rocketgit-ssl_request_log \
86 "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
87 TransferLog logs/rocketgit-ssl_access_log
79 CustomLog logs/rocketgit-ssl_access_log combined
88 80
89 81 KeepAlive On KeepAlive On
90 82 MaxKeepAliveRequests 1000 MaxKeepAliveRequests 1000
 
93 85 ServerSignature Off ServerSignature Off
94 86 UseCanonicalName On UseCanonicalName On
95 87 UseCanonicalPhysicalPort On UseCanonicalPhysicalPort On
88 LogLevel info
96 89
97 90 RewriteEngine On RewriteEngine On
91 #LogLevel rewrite:trace8
98 92
99 93 # Allow .ico, 'themes' folder and robots.txt # Allow .ico, 'themes' folder and robots.txt
100 94 RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt|\.well-known/.*)$ RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt|\.well-known/.*)$
 
102 96
103 97 # Force the use of only one name even if we have more aliases. # Force the use of only one name even if we have more aliases.
104 98 # https://httpd.apache.org/docs/2.4/rewrite/remapping.html # https://httpd.apache.org/docs/2.4/rewrite/remapping.html
105 #RewriteCond "%{HTTP_HOST}" "!^%{SERVER_NAME}$" [nocase,ornext]
106 #RewriteCond "%{HTTP_PORT}" "!^%{SERVER_PORT}$" [nocase]
99 #RewriteCond expr "%{HTTP_HOST} != %{SERVER_NAME}"
107 100 #RewriteRule "^/?(.*)" "https://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape] #RewriteRule "^/?(.*)" "https://%{SERVER_NAME}:%{SERVER_PORT}/$1" [last,redirect=301,noescape]
108 101
109 102 # all rest # all rest
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/rocketgit

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/rocketgit

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master