Minor fix, when $_SERVER["SERVER_NAME"] is undefined.
Replaced /app/ with {{ paths.app }}. Fixed #108, and similar issues.