aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Campbell <jcampbell@gnome.org>2015-05-11 21:16:30 -0500
committerJim Campbell <jcampbell@gnome.org>2015-05-11 21:16:30 -0500
commitcd7af7899f34c04a40996da68d3363af60efa1a1 (patch)
treef0491eeda7db7e8f0f39640fce28f6066b24f486
parent3948e44c9a0fd9dd30b0fe043f15d7518d567112 (diff)
downloadmediagoblin-cd7af7899f34c04a40996da68d3363af60efa1a1.tar.lz
mediagoblin-cd7af7899f34c04a40996da68d3363af60efa1a1.tar.xz
mediagoblin-cd7af7899f34c04a40996da68d3363af60efa1a1.zip
docs: Clean up nginx instructions
Made it more clear what commands to use if you're on deb/rpm-based system. Added a note that shows the user how to test their nginx configuration.
-rw-r--r--docs/source/siteadmin/deploying.rst34
1 files changed, 25 insertions, 9 deletions
diff --git a/docs/source/siteadmin/deploying.rst b/docs/source/siteadmin/deploying.rst
index 183eede8..814316b1 100644
--- a/docs/source/siteadmin/deploying.rst
+++ b/docs/source/siteadmin/deploying.rst
@@ -347,12 +347,23 @@ Create a configuration file at
``/srv/mediagoblin.example.org/nginx.conf`` and create a symbolic link
into a directory that will be included in your ``nginx`` configuration
(e.g. "``/etc/nginx/sites-enabled`` or ``/etc/nginx/conf.d``) with
-one of the following commands (as the root user)::
+one of the following commands.
- sudo ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/conf.d/
+On a DEB-based system (e.g Debian, gNewSense, Trisquel, Ubuntu, and
+derivatives) issue the following commands::
+
+ sudo apt-get install nginx
sudo ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/sites-enabled/
+ sudo systemctl enable nginx
+
+On a RPM-based system (e.g. Fedora, RedHat, and derivatives) issue the
+following commands::
-Modify these commands and locations depending on your preferences and
+ sudo yum install nginx
+ sudo ln -s /srv/mediagoblin.example.org/nginx.conf /etc/nginx/conf.d/
+ sudo systemctl enable nginx
+
+You can modify these commands and locations depending on your preferences and
the existing configuration of your nginx instance. The contents of
this ``nginx.conf`` file should be modeled on the following::
@@ -370,7 +381,7 @@ this ``nginx.conf`` file should be modeled on the following::
gzip on;
gzip_min_length 1024;
gzip_buffers 4 32k;
- gzip_types text/plain text/html application/x-javascript text/javascript text/xml text/css;
+ gzip_types text/plain application/x-javascript text/javascript text/xml text/css;
#####################################
# Mounting MediaGoblin stuff
@@ -426,16 +437,20 @@ process. This approach is faster and requires less memory.
.. note::
- The user who owns the Nginx process, normally ``www-data``,
+ The user who owns the Nginx process, normally ``www-data`` or ``nginx``,
requires execute permission on the directories ``static``,
``public``, ``theme_static`` and ``plugin_static`` plus all their
parent directories. This user also requires read permission on all
the files within these directories. This is normally the default.
-Now, nginx instance is configured to serve the MediaGoblin
-application. Perform a quick test to ensure that this configuration
-works. Restart nginx so it picks up your changes, with a command that
-resembles one of the following::
+Nginx is now configured to serve the MediaGoblin application. Perform a quick
+test to ensure that this configuration works::
+
+ nginx -t
+
+If you encounter any errors, review your nginx configuration files, and try to
+resolve them. If you do not encounter any errors, you can start your nginx
+server with one of the following commands (depending on your environment)::
sudo /etc/init.d/nginx restart
sudo /etc/rc.d/nginx restart
@@ -445,6 +460,7 @@ Now start MediaGoblin. Use the following command sequence as an
example::
cd /srv/mediagoblin.example.org/mediagoblin/
+ su mediagoblin -s /bin/bash
./lazyserver.sh --server-name=fcgi fcgi_host=127.0.0.1 fcgi_port=26543
Visit the site you've set up in your browser by visiting