Skip to content

Commit

Permalink
Improved Apache & nginx installation stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Boës committed Nov 29, 2016
1 parent c868fd6 commit 390dfba
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 2 deletions.
14 changes: 12 additions & 2 deletions docs/advanced-stuff.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
![Blogophon -](blogophon.png) Advanced stuff
==============

In this document you will find some stuff for hardcore CLI wizards.

In this document you will find some stuff for hardcore CLI wizards and server gurus.

Other means of editing articles
-------------------------------
Expand Down Expand Up @@ -49,3 +48,14 @@ Multiple blogs & global installation
------------------------------------

There are setup instructions on [hot to use Blogophon globally / for multiple blogs on one machine](global-installation.md).

Server setup
------------

### Apache installation

The Blogophon will generate a `.htaccess` file initially. If possible, move the contents of this file to your server configuration file. If you cannot modify your server configuration, but Apache executes `.htaccess`, Blogophon's `.htaccess` should be all you need.

### nginx installation

There is a [sample nginx configuration](nginx.conf) to use for your server.
17 changes: 17 additions & 0 deletions docs/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
server {
server_name example.com; # Replace with server name

index index.html;
error_page 404 /404.html;
error_page 410 /404.html;

# General Blogophon redirects
location ~ ^/htdocs/(.*)$ {
rewrite ^(.*)$ /$1 redirect;
}
location ~ ^/(posts|\d+(/\d+(/\d+)?)?)/?$ {
rewrite ^(.*)$ / redirect;
}

# Add your stuff here
}
3 changes: 3 additions & 0 deletions src/templates/.htaccess
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# ServerName {{config.domain}}
# DocumentRoot {{config.directories.htdocs}}

AddType text/xml xml rss atom
AddType text/plain .md
AddType application/json .json
Expand Down

0 comments on commit 390dfba

Please sign in to comment.