Copy over old blog
[wiki.git] / tmarble / posts / Setting_Up_MediaGoblin / etc / apache2 / sites-available / media
1 # mediagoblin
2 <VirtualHost *:80>
3         ServerName  media.info9.net
4         UseCanonicalName On
5         ServerAdmin webmaster@info9.net
6
7 <IfModule mod_rewrite.c>
8   RewriteEngine on
9   # MediaGoblin
10   # Rewrite all URLs to fcgi, except for static and media urls
11   RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]
12   RewriteCond %{REQUEST_FILENAME} !-f
13   RewriteRule ^(.*)$ /mg.fcgi/$1 [QSA,L]
14
15 </IfModule>
16
17         # DocumentRoot /var/www.old
18         DocumentRoot /srv/mediagoblin
19         <Directory />
20                 Options FollowSymLinks
21                 AllowOverride None
22         </Directory>
23         # <Directory /var/www.old/>
24         #       Options Indexes FollowSymLinks MultiViews
25         #       AllowOverride None
26         #       Order allow,deny
27         #       allow from all
28         # </Directory>
29
30
31         ErrorLog ${APACHE_LOG_DIR}/media-error.log
32
33         # Possible values include: debug, info, notice, warn, error, crit,
34         # alert, emerg.
35         LogLevel warn
36
37         CustomLog ${APACHE_LOG_DIR}/media-access.log combined
38
39 # MediaGoblin
40 Alias /mgoblin_static/ /srv/mediagoblin/mediagoblin/static/
41 Alias /mgoblin_media/ /srv/mediagoblin/user_dev/media/public/
42
43
44 # Allow access to static and media directories
45 <Directory /mgoblin_static>
46   Order allow,deny
47   Allow from all
48 </Directory>
49
50 <Directory /mgoblin_media>
51   Order allow,deny
52   Allow from all
53 </Directory>
54
55 <Directory /srv/mediagoblin/>
56         SetHandler fcgid-script
57         Options +ExecCGI
58         FcgidWrapper /srv/mediagoblin/mg.fcgi
59         order allow,deny
60         allow from all
61 </Directory>
62
63 </VirtualHost>
64