aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Lasseter <nathan@4574.co.uk>2014-06-07 10:16:18 +0000
committerNathan Lasseter <nathan@4574.co.uk>2014-06-07 10:16:18 +0000
commitb05cc0180d8dae5af2cc11860c3654cc0e45ed2b (patch)
tree231cf7df9190b0aedaeff73faf9c5a6d75296a57
parent6d03e10297392a4b8092a7b27258b2b9abc96a16 (diff)
Refactoring and updated configs
-rw-r--r--README8
-rw-r--r--htaccess.sample3
-rw-r--r--nginx.sample4
-rw-r--r--rss.php1
-rw-r--r--settings.sample7
5 files changed, 12 insertions, 11 deletions
diff --git a/README b/README
index f2969fc..e9daa11 100644
--- a/README
+++ b/README
@@ -6,18 +6,16 @@ I wanted an exceptionally small piece of blogging software, where each post was
This is that piece of software.
-Installation (Apache):
+Installation (Common):
* Clone the repo
* Create a posts directory
* Move settings.sample to settings.php and configure it
* Create a .htpasswd file for posting users
+
+Installation (Apache):
* Create an Apache virtual host or .htaccess file based on htaccess.sample
* (Optional) delete .sample files
Instructions (nginx):
-* Clone the repo
-* Create a posts directory
-* Move settings.sample to settings.php and configure it
-* Create a .htpasswd file for posting users
* Create an nginx server based on nginx.sample
* (Optional) delete .sample files
diff --git a/htaccess.sample b/htaccess.sample
index 043a3e5..42b34d4 100644
--- a/htaccess.sample
+++ b/htaccess.sample
@@ -1,12 +1,11 @@
RewriteEngine on
+RewriteRule ^feed$ /rss.php
RewriteRule ^post/(.*)$ /viewpost.php?post=$1
-#RewriteRule ^post/(.*)$ /blog/viewpost.php?post=$1
<Files "dopost.php">
AuthType Basic
AuthName "Secure"
AuthUserFile /var/www/.htpasswd
-# AuthUserFile /var/www/blog/.htpasswd
Require Valid-User
</Files>
diff --git a/nginx.sample b/nginx.sample
index ad5fa4f..f225b35 100644
--- a/nginx.sample
+++ b/nginx.sample
@@ -7,7 +7,9 @@ server {
root /var/www;
- rewrite \/post\/(.*)$ /viewpost.php?post=$1;
+ rewrite \/blog\/feed$ /blog/rss.php;
+ rewrite \/blog\/post\/(.*)$ /blog/viewpost.php?post=$1;
+
location /dopost.php {
auth_basic "Login to post";
auth_basic_user_file /var/www/.htpasswd;
diff --git a/rss.php b/rss.php
index 6e9b1d9..25fb3b8 100644
--- a/rss.php
+++ b/rss.php
@@ -37,6 +37,7 @@
echo "]]></content>\n";
echo "\t\t<author>\n";
echo "\t\t\t<name>$rssAuthorName</name>\n";
+ if (isset($rssAuthorEmail)) echo "\t\t\t<email>$rssAuthorEmail</email>\n";
echo "\t\t</author>\n";
echo "\t</entry>\n";
}
diff --git a/settings.sample b/settings.sample
index 59f63b2..0a8abe6 100644
--- a/settings.sample
+++ b/settings.sample
@@ -7,9 +7,10 @@ $blogPosts = "/var/www/posts/";
//Page title
$blogTitle = "My Clog Blog";
-//Header title
-$blogHead = $blogTitle;
+$blogSubTitle = "It's awesome";
-//Twitter Creator
+//Author Information
$twitterCreator = "Example";
+$rssAuthorName = "A. N. Other";
+//$rssAuthorEmail = ""; //optional
?>