|
@@ -6187,10 +6187,12 @@ TODO
|
6187
|
6187
|
CSipSimple?
|
6188
|
6188
|
** Install Mediagoblin
|
6189
|
6189
|
|
|
6190
|
+For a mediagoblin site it is recommended to use a separate domain/subdomain, so see [[Setting up a web site]] for details of how to create an Apache configuration for your microblog. If you're using freedns then you will need to create a new subdomain.
|
|
6191
|
+
|
6190
|
6192
|
Install some dependencies.
|
6191
|
6193
|
|
6192
|
6194
|
#+BEGIN_SRC: bash
|
6193
|
|
-apt-get install git-core python python-dev python-lxml python-imaging python-virtualenv python-gst0.10 libjpeg8-dev sqlite3
|
|
6195
|
+apt-get install git-core python python-dev python-lxml python-imaging python-virtualenv python-gst0.10 libjpeg8-dev sqlite3 libapache2-mod-fcgid
|
6194
|
6196
|
#+END_SRC
|
6195
|
6197
|
|
6196
|
6198
|
Create a user, replacing /mymediagoblinsite/ with the domain name for your mediagoblin site.
|
|
@@ -6400,7 +6402,7 @@ Add the following, replacing /mymediagoblindomain/ with the domain name for your
|
6400
|
6402
|
# CHANGE THIS
|
6401
|
6403
|
# to suit your environment
|
6402
|
6404
|
################################################################################
|
6403
|
|
-MG_ROOT=/var/www/mymediagoblindomain/htdocs
|
|
6405
|
+MG_ROOT=/srv/mymediagoblindomain/mediagoblin
|
6404
|
6406
|
MG_USER=mediagoblin
|
6405
|
6407
|
################################################################################
|
6406
|
6408
|
# NOW STOP
|
|
@@ -6548,7 +6550,68 @@ service mediagoblin-paster start
|
6548
|
6550
|
service mediagoblin-celeryd start
|
6549
|
6551
|
#+END_SRC
|
6550
|
6552
|
|
6551
|
|
-TODO: apache configuration
|
|
6553
|
+Create a script as follows:
|
|
6554
|
+
|
|
6555
|
+#+BEGIN_SRC: bash
|
|
6556
|
+emacs /srv/mymediagoblindomain/mediagoblin/mg.fcgi
|
|
6557
|
+#+END_SRC
|
|
6558
|
+
|
|
6559
|
+Add the following, replacing /mymediagoblindomain/ with your mediagoblin domain name.
|
|
6560
|
+
|
|
6561
|
+#+BEGIN_SRC: bash
|
|
6562
|
+#!/srv/mymediagoblindomain/mediagoblin/bin/python
|
|
6563
|
+
|
|
6564
|
+# Written in 2011 by Christopher Allan Webber
|
|
6565
|
+#
|
|
6566
|
+# To the extent possible under law, the author(s) have dedicated all
|
|
6567
|
+# copyright and related and neighboring rights to this software to the
|
|
6568
|
+# public domain worldwide. This software is distributed without any
|
|
6569
|
+# warranty.
|
|
6570
|
+#
|
|
6571
|
+# You should have received a copy of the CC0 Public Domain Dedication along
|
|
6572
|
+# with this software. If not, see
|
|
6573
|
+# <http://creativecommons.org/publicdomain/zero/1.0/>.
|
|
6574
|
+
|
|
6575
|
+from paste.deploy import loadapp
|
|
6576
|
+from flup.server.fcgi import WSGIServer
|
|
6577
|
+
|
|
6578
|
+CONFIG_PATH = '/srv/mymediagoblindomain/mediagoblin/paste.ini'
|
|
6579
|
+
|
|
6580
|
+## Uncomment this to run celery in "always eager" mode... ie, you don't have
|
|
6581
|
+## to run a separate process, but submissions wait till processing finishes
|
|
6582
|
+# import os
|
|
6583
|
+# os.environ['CELERY_ALWAYS_EAGER'] = 'true'
|
|
6584
|
+
|
|
6585
|
+def launch_fcgi():
|
|
6586
|
+ ccengine_wsgi_app = loadapp('config:' + CONFIG_PATH)
|
|
6587
|
+ WSGIServer(ccengine_wsgi_app).run()
|
|
6588
|
+
|
|
6589
|
+
|
|
6590
|
+if __name__ == '__main__':
|
|
6591
|
+ launch_fcgi()
|
|
6592
|
+#+END_SRC
|
|
6593
|
+
|
|
6594
|
+Save and exit, then edit the Apache configuration for your mediagoblin site.
|
|
6595
|
+
|
|
6596
|
+#+BEGIN_SRC: bash
|
|
6597
|
+emacs /etc/apache2/sites-available/mymediagoblindomain
|
|
6598
|
+#+END_SRC
|
|
6599
|
+
|
|
6600
|
+Add the following to the section which begins with *<VirtualHost *:80>*, and remove the existing ScriptAlias sections.
|
|
6601
|
+
|
|
6602
|
+#+BEGIN_SRC: bash
|
|
6603
|
+ Options +ExecCGI
|
|
6604
|
+
|
|
6605
|
+ # Accept up to 16MB requests
|
|
6606
|
+ FcgidMaxRequestLen 16777216
|
|
6607
|
+
|
|
6608
|
+ Alias /mgoblin_static/ /srv/mymediagoblindomain/mediagoblin/mediagoblin/static/
|
|
6609
|
+ Alias /mgoblin_media/ /srv/mymediagoblindomain/mediagoblin/user_dev/media/public/
|
|
6610
|
+
|
|
6611
|
+ ScriptAlias / /srv/mymediagoblindomain/mediagoblin/mg.fcgi/
|
|
6612
|
+#+END_SRC
|
|
6613
|
+
|
|
6614
|
+Save and exit.
|
6552
|
6615
|
|
6553
|
6616
|
http://mediagoblin.readthedocs.org/en/latest/siteadmin/deploying.html
|
6554
|
6617
|
https://wiki.mediagoblin.org/HackingHowto
|