# This is the apache configuration file for RocketGit
<Directory "/usr/share/rocketgit/root">
AllowOverride All
Order allow,deny
Allow from all
<IfModule mod_authz_core.c>
# apache 2.4
Require all granted
</IfModule>
# Cache at will
<FilesMatch "(?i)^.*\.(ico|flv|jpg|jpeg|png|gif|js|css|swf)$">
FileETag MTime Size
</FilesMatch>
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/vnd.microsoft.icon "access plus 7 days"
ExpiresByType image/png "access plus 1 day"
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/javascript "access plus 1 day"
ExpiresByType application/javascript "access plus 1 day"
ExpiresByType application/x-javascript "access plus 1 day"
</IfModule>
</Directory>
<VirtualHost *:80>
ServerName rg.domain.tld
ServerAlias rg
DocumentRoot /usr/share/rocketgit/root/
ErrorLog logs/rocketgit-error_log
CustomLog logs/rocketgit-access_log common
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 10
RewriteEngine On
#RewriteLog /var/log/httpd/rg-Rewrite.log
#RewriteLogLevel 3
# If you do not want HTTPS, comment the following lines and the HTTPS
# virtual host, below.
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [redirect=301,last,qsappend]
# Allow .ico, 'themes' folder and robots.txt
# Also, avoid scripts that are looking for exploits
RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt)$
RewriteRule .* - [last]
# all rest
RewriteRule (.*) /index.php?rwe=1&vv=$1 [last,qsappend]
# Security
<IfModule mod_headers.c>
Header always append X-Frame-Options DENY
</IfModule>
# Compress
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
DeflateBufferSize 81920
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /usr/share/rocketgit/root/
ErrorLog logs/rocketgit-ssl_error_log
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
TransferLog logs/rocketgit-ssl_access_log
KeepAlive On
MaxKeepAliveRequests 1000
KeepAliveTimeout 10
RewriteEngine On
#RewriteLog /var/log/httpd/rg-Rewrite.log
#RewriteLogLevel 3
# Allow .ico, 'themes' folder and robots.txt
RewriteCond %{REQUEST_URI} ^/(favicon\.ico|themes/.*|robots\.txt)$
RewriteRule .* - [last]
# all rest
RewriteRule (.*) /index.php?rwe=1&vv=$1 [last,qsappend]
# Security (ClickJacking)
<IfModule mod_headers.c>
Header always append X-Frame-Options DENY
# Add this for SSL
Header set Strict-Transport-Security "max-age=31536000"
</IfModule>
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2 -SSLv3
# Pay attention on next line! It fails on RedHat6!
#SSLCipherSuite PROFILE=SYSTEM
SSLCertificateFile /etc/pki/tls/certs/localhost.crt
SSLCertificateKeyFile /etc/pki/tls/private/localhost.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
# Compress
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/x-javascript
DeflateBufferSize 81920
</VirtualHost>
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