Skip to content
This repository was archived by the owner on Dec 7, 2018. It is now read-only.

Commit d9c2fb6

Browse files
committed
SETUP howto file
1 parent 888f9f2 commit d9c2fb6

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

Diff for: SETUP

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Setup
2+
3+
## Setup with Apache2
4+
1. Install mod_python for Apache2 webserver
5+
1. Clone gitblog.py as webroot on your server
6+
7+
```
8+
git clone https://github.com/pecharmin/gitblog.py.git /var/www/gitblog.py
9+
```
10+
11+
1. Setup a git bare repository on your server and push your local content to it
12+
13+
```
14+
git init --bare /var/git/gitblog.tld.git
15+
```
16+
17+
1. Setup a local git repository on your desktop and create a directory structure
18+
19+
```
20+
git init gitblog.tld
21+
cd gitblog.tld
22+
echo '# Hello World' > hello
23+
git add hello
24+
git commit -m 'First git blog entry'
25+
git remote add origin ssh://user@webserver:22/var/git/gitblog.tld.git
26+
git push -u origin master
27+
```
28+
29+
1. Create a virtual host for your webserver configuration
30+
31+
```
32+
<VirtualHost *:80>
33+
ServerName gitblog.tld
34+
ServerAdmin [email protected]
35+
36+
LogLevel warn
37+
ErrorLog /var/log/apache2/error_log-%{SERVER_NAME}
38+
CustomLog /var/log/apache2/access_log-%{SERVER_NAME} vhost
39+
40+
DocumentRoot /var/www/gitblog.py
41+
42+
<Location />
43+
Require all granted
44+
SetHandler mod_python
45+
PythonHandlerModule gitblog
46+
PythonPath "sys.path + ['/var/www/gitblog.py']"
47+
PythonOptimize On
48+
PythonAutoReload Off
49+
PythonDebug Off
50+
PythonOption gitblog.wwwroot /var/git/gitblog.tld.git
51+
</Location>
52+
53+
# Compress output by filter
54+
<IfModule mod_deflate.c>
55+
SetOutputFilter DEFLATE
56+
</IfModule>
57+
58+
# Cache website responses
59+
<IfModule mod_cache.c>
60+
<IfModule mod_disk_cache.c>
61+
CacheRoot /var/cache/apache2/gitblog.tld/
62+
CacheEnable disk /
63+
CacheDirLevels 5
64+
CacheDirLength 3
65+
</IfModule>
66+
</IfModule>
67+
</VirtualHost>
68+
```
69+
70+
## gitblog configuration options
71+
TODO

0 commit comments

Comments
 (0)