<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.mediagoblin.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SpamapS</id>
	<title>GNU MediaGoblin Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.mediagoblin.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=SpamapS"/>
	<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/Special:Contributions/SpamapS"/>
	<updated>2026-04-10T02:42:27Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=Deployment&amp;diff=910</id>
		<title>Deployment</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=Deployment&amp;diff=910"/>
		<updated>2012-10-09T04:33:48Z</updated>

		<summary type="html">&lt;p&gt;SpamapS: Changing juju charm to reflect recent updates.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page could use a lot of work.  For now, a few smaller deployment tips!&lt;br /&gt;
&lt;br /&gt;
See also: http://docs.mediagoblin.org/deploying.html (some of which may belong here)&lt;br /&gt;
&lt;br /&gt;
= FCGI script =&lt;br /&gt;
&lt;br /&gt;
This works great with the apache config example below :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/path/to/mediagoblin/bin/python&lt;br /&gt;
&lt;br /&gt;
# Written in 2011 by Christopher Allan Webber&lt;br /&gt;
#&lt;br /&gt;
# To the extent possible under law, the author(s) have dedicated all&lt;br /&gt;
# copyright and related and neighboring rights to this software to the&lt;br /&gt;
# public domain worldwide. This software is distributed without any&lt;br /&gt;
# warranty.&lt;br /&gt;
# &lt;br /&gt;
# You should have received a copy of the CC0 Public Domain Dedication along&lt;br /&gt;
# with this software. If not, see&lt;br /&gt;
# &amp;lt;http://creativecommons.org/publicdomain/zero/1.0/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
from paste.deploy import loadapp&lt;br /&gt;
from flup.server.fcgi import WSGIServer&lt;br /&gt;
&lt;br /&gt;
CONFIG_PATH = &#039;/path/to/mediagoblin/paste.ini&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def launch_fcgi():&lt;br /&gt;
    ccengine_wsgi_app = loadapp(&#039;config:&#039; + CONFIG_PATH)&lt;br /&gt;
    WSGIServer(ccengine_wsgi_app).run()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    launch_fcgi()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Apache 2 Config with fcgid =&lt;br /&gt;
&lt;br /&gt;
Note that the libapache2-mod-fcgi in Debian is in the nonfree section, and MediaGoblin users will want to avoid that. Instead, libapache2-mod-fcgid can be used, but requires a slightly different configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
ServerName media.example.com&lt;br /&gt;
ServerAlias www.media.example.com&lt;br /&gt;
&lt;br /&gt;
DocumentRoot /path/to/mediagoblin&lt;br /&gt;
&lt;br /&gt;
Alias /mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/&lt;br /&gt;
Alias /mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/&lt;br /&gt;
&lt;br /&gt;
# Rewrite all URLs to fcgi, except for static and media urls&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^/(.*)$ /mg.fcgi/$1 [QSA,L]&lt;br /&gt;
&lt;br /&gt;
# Allow access to static and media directories&lt;br /&gt;
&amp;lt;Directory /mgoblin_static&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /mgoblin_media&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/&amp;gt;&lt;br /&gt;
        SetHandler fcgid-script&lt;br /&gt;
        Options +ExecCGI&lt;br /&gt;
        FcgidWrapper /path/to/mediagoblin/mg.fcgi&lt;br /&gt;
        order allow,deny&lt;br /&gt;
        allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Apache Config Example =&lt;br /&gt;
This configuration example uses mod_fastcgi.&lt;br /&gt;
&lt;br /&gt;
To install and enable mod_fastcgi on a Debian/Ubuntu based system:&lt;br /&gt;
&amp;lt;pre&amp;gt;# apt-get install libapache2-mod-suexec libapache2-mod-fastcgi&lt;br /&gt;
# a2enmod suexec&lt;br /&gt;
# a2enmod fastcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
ServerName mediagoblin.yourdomain.tld&lt;br /&gt;
ServerAdmin webmaster@yourdoimain.tld&lt;br /&gt;
DocumentRoot /var/www/&lt;br /&gt;
# Custom log files&lt;br /&gt;
CustomLog /var/log/apache2/mediagobling_access.log combined&lt;br /&gt;
ErrorLog /var/log/apache2/mediagoblin_error.log&lt;br /&gt;
&lt;br /&gt;
# Serve static and media files via alias&lt;br /&gt;
Alias /mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/&lt;br /&gt;
Alias /mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/&lt;br /&gt;
&lt;br /&gt;
# Rewrite all URLs to fcgi, except for static and media urls&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^/(.*)$ /mg.fcgi/$1 [QSA,L]&lt;br /&gt;
&lt;br /&gt;
# Allow access to static and media directories&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/mediagoblin/static&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/mediagoblin/user_dev/media/public&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Connect to fcgi server&lt;br /&gt;
FastCGIExternalServer /var/www/mg.fcgi -host 127.0.0.1:26543&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, you need to make sure mediagoblin is running in fcgi mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/mediagoblin&lt;br /&gt;
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: there may be several ways to improve this configuration&lt;br /&gt;
&lt;br /&gt;
= Juju =&lt;br /&gt;
&lt;br /&gt;
There is a juju [https://juju.ubuntu.com/Charms charm] available for deploying mediagoblin into EC2 or on your local box.  [https://juju.ubuntu.com/ juju] is available in Ubuntu 11.10 and later, though it is recommended that you pull it from [https://launchpad.net/~juju/+archive/pkgs| the juju PPA], which includes backported packages going back to Ubuntu 11.10. To use the juju charm, install juju and configure either the [https://juju.ubuntu.com/docs/provider-configuration-local.html local provider] or one of the cloud API providers, currently the [https://juju.ubuntu.com/docs/provider-configuration-ec2.html EC2 provider] is the best supported and works not only with Amazon Web Services but also OpenStack clouds. There is also a newer native OpenStack API provider which is known to support HP Cloud.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# if you have not bootstrapped&lt;br /&gt;
juju bootstrap&lt;br /&gt;
mkdir ~/charms&lt;br /&gt;
bzr init-repo ~/charms/precise&lt;br /&gt;
bzr branch lp:~clint-fewbar/charms/precise/mediagoblin/trunk ~/charms/precise/mediagoblin&lt;br /&gt;
juju deploy --repository ~/charms local:mediagoblin&lt;br /&gt;
juju expose mediagoblin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently the charm is volatile, deploying from trunk, and deploys a single-server version of MediaGoblin only. It will eventually relate to the existing juju charms for other supported data stores to allow one to scale out their MediaGoblin instance.&lt;br /&gt;
&lt;br /&gt;
= ArchLinux init scripts =&lt;br /&gt;
&lt;br /&gt;
[http://whird.jpope.org/2012/04/14/mediagoblin-archlinux-rcd-scripts Jeremy Pope has written a nice blogpost] on how to add init scripts to deploy MediaGoblin with both the python paste http server and the celery deployments separated.&lt;br /&gt;
&lt;br /&gt;
If you want a simpler setup and don&#039;t want to deploy celery separately, consider either turning CELERY_ALWAYS_EAGER to true in the paste init script described above, or check out [http://chimo.chromic.org/2012/03/01/mediagoblin-init-script-on-archlinux/ Chimo&#039;s guide].&lt;/div&gt;</summary>
		<author><name>SpamapS</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=Deployment&amp;diff=508</id>
		<title>Deployment</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=Deployment&amp;diff=508"/>
		<updated>2012-01-24T23:50:54Z</updated>

		<summary type="html">&lt;p&gt;SpamapS: Adding expose so service is un-firewalled&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page could use a lot of work.  For now, a few smaller deployment tips!&lt;br /&gt;
&lt;br /&gt;
See also: http://docs.mediagoblin.org/deploying.html (some of which may belong here)&lt;br /&gt;
&lt;br /&gt;
= MongoDB setup =&lt;br /&gt;
&lt;br /&gt;
You should almost certainly [http://www.mongodb.org/display/DOCS/Journaling run MongoDB with Journaling on] if you have a new enough version of MongoDB.  (If you don&#039;t, maybe you should get a newer version!)  Without journaling there&#039;s some risk you could lose data that isn&#039;t yet written to disk if MongoDB is shut down incorrectly. &#039;&#039;&#039;But read about disk space below.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also, keep in mind the following [http://www.snailinaturtleneck.com/blog/2010/08/19/if-it-quacks-like-a-rdbms/ assumptions MongoDB makes] about your deployment environment&lt;br /&gt;
&lt;br /&gt;
* 64-bit machine&lt;br /&gt;
* little-endian&lt;br /&gt;
* more than one server&lt;br /&gt;
* speed is more important than reliability, and journaling is off by default (apparently that’s not true anymore, at least in 2.0, [http://www.mongodb.org/display/DOCS/Journaling journaling is on and will preallocate &#039;&#039;gigabytes&#039;&#039; for the journal files], unless you [[Scaling Down|enable the “smallfiles” option]]).)&lt;br /&gt;
&lt;br /&gt;
= FCGI script =&lt;br /&gt;
&lt;br /&gt;
This works great with the apache config example below :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/path/to/mediagoblin/bin/python&lt;br /&gt;
&lt;br /&gt;
# Written in 2011 by Christopher Allan Webber&lt;br /&gt;
#&lt;br /&gt;
# To the extent possible under law, the author(s) have dedicated all&lt;br /&gt;
# copyright and related and neighboring rights to this software to the&lt;br /&gt;
# public domain worldwide. This software is distributed without any&lt;br /&gt;
# warranty.&lt;br /&gt;
# &lt;br /&gt;
# You should have received a copy of the CC0 Public Domain Dedication along&lt;br /&gt;
# with this software. If not, see&lt;br /&gt;
# &amp;lt;http://creativecommons.org/publicdomain/zero/1.0/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
from paste.deploy import loadapp&lt;br /&gt;
from flup.server.fcgi import WSGIServer&lt;br /&gt;
&lt;br /&gt;
CONFIG_PATH = &#039;/path/to/mediagoblin/paste.ini&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def launch_fcgi():&lt;br /&gt;
    ccengine_wsgi_app = loadapp(&#039;config:&#039; + CONFIG_PATH)&lt;br /&gt;
    WSGIServer(ccengine_wsgi_app).run()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    launch_fcgi()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Apache 2 Config with fcgid =&lt;br /&gt;
&lt;br /&gt;
Note that the libapache2-mod-fcgi in Debian is in the nonfree section, and MediaGoblin users will want to avoid that. Instead, libapache2-mod-fcgid can be used, but requires a slightly different configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
ServerName media.example.com&lt;br /&gt;
ServerAlias www.media.example.com&lt;br /&gt;
&lt;br /&gt;
DocumentRoot /path/to/mediagoblin&lt;br /&gt;
&lt;br /&gt;
Alias /mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/&lt;br /&gt;
Alias /mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/&lt;br /&gt;
&lt;br /&gt;
# Rewrite all URLs to fcgi, except for static and media urls&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^/(.*)$ /mg.fcgi/$1 [QSA,L]&lt;br /&gt;
&lt;br /&gt;
# Allow access to static and media directories&lt;br /&gt;
&amp;lt;Directory /mgoblin_static&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /mgoblin_media&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/&amp;gt;&lt;br /&gt;
        SetHandler fcgid-script&lt;br /&gt;
        Options +ExecCGI&lt;br /&gt;
        FcgidWrapper /path/to/mediagoblin/mg.fcgi&lt;br /&gt;
        order allow,deny&lt;br /&gt;
        allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Apache Config Example =&lt;br /&gt;
This configuration example uses mod_fastcgi.&lt;br /&gt;
&lt;br /&gt;
To install and enable mod_fastcgi on a Debian/Ubuntu based system:&lt;br /&gt;
&amp;lt;pre&amp;gt;# apt-get install libapache2-mod-suexec libapache2-mod-fastcgi&lt;br /&gt;
# a2enmod suexec&lt;br /&gt;
# a2enmod fastcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
ServerName mediagoblin.yourdomain.tld&lt;br /&gt;
ServerAdmin webmaster@yourdoimain.tld&lt;br /&gt;
DocumentRoot /var/www/&lt;br /&gt;
# Custom log files&lt;br /&gt;
CustomLog /var/log/apache2/mediagobling_access.log combined&lt;br /&gt;
ErrorLog /var/log/apache2/mediagoblin_error.log&lt;br /&gt;
&lt;br /&gt;
# Serve static and media files via alias&lt;br /&gt;
Alias /mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/&lt;br /&gt;
Alias /mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/&lt;br /&gt;
&lt;br /&gt;
# Rewrite all URLs to fcgi, except for static and media urls&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^/(.*)$ /mg.fcgi/$1 [QSA,L]&lt;br /&gt;
&lt;br /&gt;
# Allow access to static and media directories&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/mediagoblin/static&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/mediagoblin/user_dev/media/public&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Connect to fcgi server&lt;br /&gt;
FastCGIExternalServer /var/www/mg.fcgi -host 127.0.0.1:26543&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, you need to make sure mediagoblin is running in fcgi mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/mediagoblin&lt;br /&gt;
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: there may be several ways to improve this configuration&lt;br /&gt;
&lt;br /&gt;
= Juju =&lt;br /&gt;
&lt;br /&gt;
There is a juju [https://juju.ubuntu.com/Charms charm] available for deploying mediagoblin into EC2 or on your local box.  [https://juju.ubuntu.com/ juju] is available in Ubuntu 11.10 and later, though it is recommended that you pull it from [https://launchpad.net/~juju/+archive/pkgs| the juju PPA], which includes backported packages going back to Ubuntu 10.04. To use the juju charm, install juju and configure either the [https://juju.ubuntu.com/docs/provider-configuration-local.html local provider] or the [https://juju.ubuntu.com/docs/provider-configuration-ec2.html EC2 provider]. Make sure your environment is bootstrapped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/charms&lt;br /&gt;
bzr init-repo ~/charms/oneiric&lt;br /&gt;
bzr branch lp:~clint-fewbar/charms/oneiric/mediagoblin/trunk ~/charms/oneiric/mediagoblin&lt;br /&gt;
juju deploy --repository ~/charms local:mediagoblin&lt;br /&gt;
juju expose mediagoblin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently the charm is very volatile, and deploys a single-server version of MediaGoblin only, but it will eventually relate to the existing juju charms for other supported data stores to allow one to scale out their MediaGoblin instance.&lt;/div&gt;</summary>
		<author><name>SpamapS</name></author>
	</entry>
	<entry>
		<id>https://wiki.mediagoblin.org/index.php?title=Deployment&amp;diff=504</id>
		<title>Deployment</title>
		<link rel="alternate" type="text/html" href="https://wiki.mediagoblin.org/index.php?title=Deployment&amp;diff=504"/>
		<updated>2012-01-24T21:02:51Z</updated>

		<summary type="html">&lt;p&gt;SpamapS: Adding juju charm section&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page could use a lot of work.  For now, a few smaller deployment tips!&lt;br /&gt;
&lt;br /&gt;
See also: http://docs.mediagoblin.org/deploying.html (some of which may belong here)&lt;br /&gt;
&lt;br /&gt;
= MongoDB setup =&lt;br /&gt;
&lt;br /&gt;
You should almost certainly [http://www.mongodb.org/display/DOCS/Journaling run MongoDB with Journaling on] if you have a new enough version of MongoDB.  (If you don&#039;t, maybe you should get a newer version!)  Without journaling there&#039;s some risk you could lose data that isn&#039;t yet written to disk if MongoDB is shut down incorrectly. &#039;&#039;&#039;But read about disk space below.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also, keep in mind the following [http://www.snailinaturtleneck.com/blog/2010/08/19/if-it-quacks-like-a-rdbms/ assumptions MongoDB makes] about your deployment environment&lt;br /&gt;
&lt;br /&gt;
* 64-bit machine&lt;br /&gt;
* little-endian&lt;br /&gt;
* more than one server&lt;br /&gt;
* speed is more important than reliability, and journaling is off by default (apparently that’s not true anymore, at least in 2.0, [http://www.mongodb.org/display/DOCS/Journaling journaling is on and will preallocate &#039;&#039;gigabytes&#039;&#039; for the journal files], unless you [[Scaling Down|enable the “smallfiles” option]]).)&lt;br /&gt;
&lt;br /&gt;
= FCGI script =&lt;br /&gt;
&lt;br /&gt;
This works great with the apache config example below :)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;#!/path/to/mediagoblin/bin/python&lt;br /&gt;
&lt;br /&gt;
# Written in 2011 by Christopher Allan Webber&lt;br /&gt;
#&lt;br /&gt;
# To the extent possible under law, the author(s) have dedicated all&lt;br /&gt;
# copyright and related and neighboring rights to this software to the&lt;br /&gt;
# public domain worldwide. This software is distributed without any&lt;br /&gt;
# warranty.&lt;br /&gt;
# &lt;br /&gt;
# You should have received a copy of the CC0 Public Domain Dedication along&lt;br /&gt;
# with this software. If not, see&lt;br /&gt;
# &amp;lt;http://creativecommons.org/publicdomain/zero/1.0/&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
from paste.deploy import loadapp&lt;br /&gt;
from flup.server.fcgi import WSGIServer&lt;br /&gt;
&lt;br /&gt;
CONFIG_PATH = &#039;/path/to/mediagoblin/paste.ini&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
def launch_fcgi():&lt;br /&gt;
    ccengine_wsgi_app = loadapp(&#039;config:&#039; + CONFIG_PATH)&lt;br /&gt;
    WSGIServer(ccengine_wsgi_app).run()&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
if __name__ == &#039;__main__&#039;:&lt;br /&gt;
    launch_fcgi()&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Apache 2 Config with fcgid =&lt;br /&gt;
&lt;br /&gt;
Note that the libapache2-mod-fcgi in Debian is in the nonfree section, and MediaGoblin users will want to avoid that. Instead, libapache2-mod-fcgid can be used, but requires a slightly different configuration.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
ServerName media.example.com&lt;br /&gt;
ServerAlias www.media.example.com&lt;br /&gt;
&lt;br /&gt;
DocumentRoot /path/to/mediagoblin&lt;br /&gt;
&lt;br /&gt;
Alias /mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/&lt;br /&gt;
Alias /mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/&lt;br /&gt;
&lt;br /&gt;
# Rewrite all URLs to fcgi, except for static and media urls&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^/(.*)$ /mg.fcgi/$1 [QSA,L]&lt;br /&gt;
&lt;br /&gt;
# Allow access to static and media directories&lt;br /&gt;
&amp;lt;Directory /mgoblin_static&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /mgoblin_media&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/&amp;gt;&lt;br /&gt;
        SetHandler fcgid-script&lt;br /&gt;
        Options +ExecCGI&lt;br /&gt;
        FcgidWrapper /path/to/mediagoblin/mg.fcgi&lt;br /&gt;
        order allow,deny&lt;br /&gt;
        allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Apache Config Example =&lt;br /&gt;
This configuration example uses mod_fastcgi.&lt;br /&gt;
&lt;br /&gt;
To install and enable mod_fastcgi on a Debian/Ubuntu based system:&lt;br /&gt;
&amp;lt;pre&amp;gt;# apt-get install libapache2-mod-suexec libapache2-mod-fastcgi&lt;br /&gt;
# a2enmod suexec&lt;br /&gt;
# a2enmod fastcgi&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Sample configuration:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
ServerName mediagoblin.yourdomain.tld&lt;br /&gt;
ServerAdmin webmaster@yourdoimain.tld&lt;br /&gt;
DocumentRoot /var/www/&lt;br /&gt;
# Custom log files&lt;br /&gt;
CustomLog /var/log/apache2/mediagobling_access.log combined&lt;br /&gt;
ErrorLog /var/log/apache2/mediagoblin_error.log&lt;br /&gt;
&lt;br /&gt;
# Serve static and media files via alias&lt;br /&gt;
Alias /mgoblin_static/ /path/to/mediagoblin/mediagoblin/static/&lt;br /&gt;
Alias /mgoblin_media/ /path/to/mediagoblin/user_dev/media/public/&lt;br /&gt;
&lt;br /&gt;
# Rewrite all URLs to fcgi, except for static and media urls&lt;br /&gt;
RewriteEngine On&lt;br /&gt;
RewriteRule ^(mgoblin_static|mgoblin_media)($|/) - [L]&lt;br /&gt;
RewriteCond %{REQUEST_FILENAME} !-f&lt;br /&gt;
RewriteRule ^/(.*)$ /mg.fcgi/$1 [QSA,L]&lt;br /&gt;
&lt;br /&gt;
# Allow access to static and media directories&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/mediagoblin/static&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;Directory /path/to/mediagoblin/mediagoblin/user_dev/media/public&amp;gt;&lt;br /&gt;
  Order allow,deny&lt;br /&gt;
  Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Connect to fcgi server&lt;br /&gt;
FastCGIExternalServer /var/www/mg.fcgi -host 127.0.0.1:26543&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then, you need to make sure mediagoblin is running in fcgi mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;cd /path/to/mediagoblin&lt;br /&gt;
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: there may be several ways to improve this configuration&lt;br /&gt;
&lt;br /&gt;
= Juju =&lt;br /&gt;
&lt;br /&gt;
There is a juju [https://juju.ubuntu.com/Charms charm] available for deploying mediagoblin into EC2 or on your local box.  [https://juju.ubuntu.com/ juju] is available in Ubuntu 11.10 and later, though it is recommended that you pull it from [https://launchpad.net/~juju/+archive/pkgs| the juju PPA], which includes backported packages going back to Ubuntu 10.04. To use the juju charm, install juju and configure either the [https://juju.ubuntu.com/docs/provider-configuration-local.html local provider] or the [https://juju.ubuntu.com/docs/provider-configuration-ec2.html EC2 provider]. Make sure your environment is bootstrapped.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
mkdir ~/charms&lt;br /&gt;
bzr init-repo ~/charms/oneiric&lt;br /&gt;
bzr branch lp:~clint-fewbar/charms/oneiric/mediagoblin/trunk ~/charms/oneiric/mediagoblin&lt;br /&gt;
juju deploy --repository ~/charms local:mediagoblin&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Currently the charm is very volatile, and deploys a single-server version of MediaGoblin only, but it will eventually relate to the existing juju charms for other supported data stores to allow one to scale out their MediaGoblin instance.&lt;/div&gt;</summary>
		<author><name>SpamapS</name></author>
	</entry>
</feed>