aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChimo <chimo@chromic.org>2015-07-25 09:37:10 -0400
committerChimo <chimo@chromic.org>2015-07-25 09:39:55 -0400
commit05b814ce68d3c879e252bfeee483f3c67ae07952 (patch)
tree99b90b465dd6016bdfbb4bb5148e4412e4a3ea8a
parent5b09a150bc7face85a63e0deca019fb093ed4f48 (diff)
downloadgnu-social-05b814ce68d3c879e252bfeee483f3c67ae07952.tar
gnu-social-05b814ce68d3c879e252bfeee483f3c67ae07952.zip
Add nginx sample configuration
-rw-r--r--INSTALL4
-rw-r--r--nginx.conf.sample53
2 files changed, 56 insertions, 1 deletions
diff --git a/INSTALL b/INSTALL
index 90fa84923b..64f30139bf 100644
--- a/INSTALL
+++ b/INSTALL
@@ -196,7 +196,9 @@ your server (like lighttpd or nginx).
file is well commented.
* For lighttpd, inspect the lighttpd.conf.example file and apply the
appropriate changes in your virtualhost configuration for lighttpd.
- * For nginx and other webservers, we gladly accept contributions of
+ * For nginx, inspect the nginx.conf.sample file and apply the appropriate
+ changes.
+ * For other webservers, we gladly accept contributions of
server configuration examples.
2. Assuming your webserver is properly configured and have its settings
diff --git a/nginx.conf.sample b/nginx.conf.sample
new file mode 100644
index 0000000000..d05c676bc1
--- /dev/null
+++ b/nginx.conf.sample
@@ -0,0 +1,53 @@
+server {
+ # Ports
+ listen 80;
+ # Uncomment the following line
+ # to enable HTTPS
+ #listen 443 ssl;
+
+ # Server name
+ # Change "example.org" to your domain name
+ server_name example.org;
+
+ # SSL
+ # Uncomment and change the paths to setup
+ # your SSL key/cert. See https://cipherli.st/
+ # for more information
+ #ssl_certificate /path/to/ssl.cert;
+ #ssl_certificate_key /path/to/ssl.key;
+
+ # Logs
+ # Uncomment and change the paths to setup
+ # logging
+ #access_log /path/to/access.log;
+ #error_log /path/to/error.log;
+
+ # Root
+ # Change the path below to where you installed
+ # GNU social
+ root /path/to/gnusocial/root;
+
+ # Index
+ index index.php;
+
+ # PHP
+ location ~ \.php {
+ fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
+ # Remove the "fastcgi_pass" line above and uncomment
+ # the one below to use TCP sockets instead of Unix sockets
+ #fastcgi_pass 127.0.0.1:9000;
+ fastcgi_index index.php;
+ include fastcgi.conf;
+ }
+
+ # Location
+ location / {
+ try_files $uri $uri/ @gnusocial;
+ }
+
+ # Fancy URLs
+ location @gnusocial {
+ rewrite ^(.*)$ /index.php?p=$1 last;
+ }
+}
+