diff --git a/Apache.md b/Apache.md new file mode 100644 index 0000000..fda1b62 --- /dev/null +++ b/Apache.md @@ -0,0 +1,50 @@ +# Apache Configuration + +Here's some tips on getting Rophako set up on Apache. + +# mod\_fcgid and mod\_rewrite + +For kirsle.net I needed to set it up using `mod_fcgid` because my site has a lot +of legacy URLs to old static files, so Rophako needs to serve the main website +pages and Apache needs to serve everything else. + +* Apache configuration: + +```apache +# Rophako www.kirsle.net + + ServerName www.kirsle.net + DocumentRoot /home/kirsle/www + CustomLog /home/kirsle/logs/access_log combined + ErrorLog /home/kirsle/logs/error_log + SuexecUserGroup kirsle kirsle + + + Options Indexes FollowSymLinks ExecCGI + AllowOverride All + Order allow,deny + Allow from all + + + + SetHandler fcgid-script + Options +ExecCGI + AllowOverride all + Order allow,deny + Allow from all + + +``` + +* `~/www/.htaccess` configuration: + +```apache + + RewriteEngine on + RewriteBase / + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.*)$ /fcgi/index.fcgi/$1 [QSA,L] + RewriteRule ^$ /fcgi/index.fcgi/ [QSA,L] + +``` diff --git a/README.md b/README.md index 4f9de52..a3be412 100644 --- a/README.md +++ b/README.md @@ -14,4 +14,8 @@ This project is under heavy construction. These may need to be installed for the dependencies to build: -**Fedora:** `libffi-devel` +**Fedora:** `libffi-devel libjpeg-devel libpng-devel` + +# Configuration + +See `Apache.md` for Apache setup information. diff --git a/rophako/www/blog/entry.inc.html b/rophako/www/blog/entry.inc.html index 94b871e..ed718b0 100644 --- a/rophako/www/blog/entry.inc.html +++ b/rophako/www/blog/entry.inc.html @@ -9,19 +9,16 @@ {% endif %}
- {# TODO #} - {% if post["photo"] %} - - {% elif post["avatar"] %} - - {% else %} - - {% endif %} -
+ {% if post["photo"] %} + + {% elif post["avatar"] %} + + {% else %} + + {% endif %} +
- - {{ post["profile"]["username"] }} - + {{ post["profile"]["username"] }}