<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Koken on Janik von Rotz</title>
    <link>https://janikvonrotz.ch/tags/koken/</link>
    <description>Recent content in Koken on Janik von Rotz</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 31 Aug 2015 06:45:57 +0000</lastBuildDate>
    <atom:link href="https://janikvonrotz.ch/tags/koken/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Install Koken website</title>
      <link>https://janikvonrotz.ch/2015/08/31/install-koken-website/</link>
      <pubDate>Mon, 31 Aug 2015 06:45:57 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2015/08/31/install-koken-website/</guid>
      <description>&lt;p&gt;&lt;em&gt;This post is part of my &lt;a href=&#34;https://janikvonrotz.ch/your-own-virtual-private-server-hosting-solution/&#34;&gt;Your own Virtual Private Server hosting solution&lt;/a&gt; project.&lt;/em&gt;&lt;br&gt;&#xA;&lt;em&gt;Get the latest version of this article here: &lt;a href=&#34;https://gist.github.com/2b582ca4e08a6a0e4de2&#34;&gt;https://gist.github.com/2b582ca4e08a6a0e4de2&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;introduction&#34;&gt;Introduction&lt;/h1&gt;&#xA;&lt;p&gt;Koken is a content management system and image publishing application for photographers.&#xA;Head over to &lt;a href=&#34;http://koken.me/&#34;&gt;http://koken.me/&lt;/a&gt; to learn more about Koken.&lt;/p&gt;&#xA;&lt;h1 id=&#34;requirements&#34;&gt;Requirements&lt;/h1&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/13/deploy-ubuntu-server/&#34;&gt;Ubuntu server&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/31/install-nginx/&#34;&gt;Nginx&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/04/01/nginx-minimal-website/&#34;&gt;Nginx minimal website&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/20/install-php5-fpm/&#34;&gt;php5-fpm&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/03/25/install-php5-modules/&#34;&gt;php5-mysql, php5-curl&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/04/11/install-nginx-php5-fpm-website/&#34;&gt;Nginx php5-fpm website&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/04/07/install-mysql/&#34;&gt;MySQL&lt;/a&gt;&lt;/li&gt;&#xA;&lt;li&gt;&lt;a href=&#34;https://janikvonrotz.ch/2014/04/11/increase-max-upload-for-php5-fpm-website/&#34;&gt;Increased Max Upload for php5-fpm website&lt;/a&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h1 id=&#34;installation&#34;&gt;Installation&lt;/h1&gt;&#xA;&lt;p&gt;Create the application directory&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo mkdir /var/www/&amp;lt;Koken&amp;gt;/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Open the Koken application directory&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;cd /var/www/&amp;lt;Koken&amp;gt;/&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Download latest Koken package and unzip it. You can get the link to the latest release here: &lt;a href=&#34;http://help.koken.me/customer/portal/articles/632102-installation&#34;&gt;http://help.koken.me/customer/portal/articles/632102-installation&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo wget https://s3.amazonaws.com/install.koken.me/releases/Koken_Installer.zip&#xA;sudo unzip Koken_Installer.zip&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Copy the extracted files to the current folder and delete the other files&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo cp -r ./Koken_Installer/koken/* ./&#xA;sudo rm -r Koken_Installer&#xA;sudo rm Koken_Installer.zip&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s create the MySQL Koken database and user.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;mysql -u root -p&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Enter the MySQL root user password.&lt;/p&gt;&#xA;&lt;p&gt;Create the Koken database.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;CREATE DATABASE &amp;lt;koken&amp;gt;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Create the Koken database user.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;CREATE USER &amp;lt;koken&amp;gt;@localhost;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Set the password for the Koken database user.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;SET PASSWORD FOR &amp;lt;koken&amp;gt;@localhost = PASSWORD(&amp;quot;&amp;lt;password&amp;gt;&amp;quot;);&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Grant Koken user full access on the Koken database.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;GRANT ALL PRIVILEGES ON &amp;lt;koken&amp;gt;.* TO &amp;lt;koken&amp;gt;@localhost IDENTIFIED BY &#39;&amp;lt;password&amp;gt;&#39;;&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Refresh MySQL and exit.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;FLUSH PRIVILEGES;&#xA;exit&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Add the Nginx configuration to the Koken website configuration file.&lt;/p&gt;&#xA;&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;server{    &#xA; &#xA;  ...&#xA; &#xA;     # Standard site requests are cached with .html extensions&#xA;    set $cache_ext &amp;#39;html&amp;#39;;&#xA;    &#xA;    # Enable gzip. Highly recommending for best peformance&#xA;    gzip on;&#xA;    gzip_comp_level 6;&#xA;    gzip_types text/html text/css text/javascript application/json application/javascript application/x-javascript;&#xA;&#xA;    # By default, do not set expire headers&#xA;    expires 0;&#xA;&#xA;    # Set expires header for console CSS and JS.&#xA;    # These files are timestamped with each new release, so it is safe to cache them agressively.&#xA;    location ~ &amp;#34;console_.*\.(js|css)$&amp;#34; {&#xA;        expires max;&#xA;    }&#xA;    &#xA;    # Catch image requests and pass them back to PHP if a cache does not yet exist&#xA;    location ~ &amp;#34;^/storage/cache/images(/(([0-9]{3}/[0-9]{3})|custom)/.*)$&amp;#34; {&#xA;        # Cached images have timestamps in the URL, so it is safe to set&#xA;        # aggresive cache headers here.&#xA;        expires max;&#xA;        try_files $uri /i.php?path=$1;&#xA;    }&#xA;&#xA;    # Catch .css.lens requests and serve cache when possible&#xA;    location ~ &amp;#34;(lightbox-)?settings.css.lens$&amp;#34; {&#xA;        default_type text/css;&#xA;        try_files /storage/cache/site/${uri} /app/site/site.php?url=https://janikvonrotz.ch/$1settings.css.lens;&#xA;    }&#xA;&#xA;    # Catch koken.js requests and serve cache when possible&#xA;    location ~ koken.js$ {&#xA;        default_type text/javascript;&#xA;        try_files /storage/cache/site/${uri} /app/site/site.php?url=https://janikvonrotz.ch/koken.js;&#xA;    }&#xA;&#xA;    # PJAX requests contain the _pjax GET parameter and are cached with .phtml extensions&#xA;    if ($arg__pjax) {&#xA;        set $cache_ext &amp;#39;phtml&amp;#39;;&#xA;    }&#xA;&#xA;    # Do not check for a cache for non-GET requests&#xA;    if ($request_method != &amp;#39;GET&amp;#39;) {&#xA;        set $cache_ext &amp;#39;nocache&amp;#39;;&#xA;    }&#xA;&#xA;    # If share_to_tumblr cookie is preset, disable caching (long story)&#xA;    if ($http_cookie ~* &amp;#34;share_to_tumblr&amp;#34; ) {&#xA;        set $cache_ext &amp;#39;nocache&amp;#39;;&#xA;    }&#xA;&#xA;    # Catch root requests&#xA;    location ~ ^/?$ {&#xA;        try_files /storage/cache/site/index/cache.$cache_ext /app/site/site.php?url=https://janikvonrotz.ch/;&#xA;    }&#xA;  &#xA;    # All other requests get passed back to Koken unless file already exists&#xA;    location / {&#xA;        try_files $uri $uri/ /storage/cache/site/${uri} /storage/cache/site/${uri}cache.$cache_ext /app/site/site.php?url=$uri&amp;amp;$args;&#xA;    }&#xA; &#xA;  ...&#xA; &#xA;&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Grant permissions for the &lt;code&gt;www-data&lt;/code&gt; group and user.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo chown www-data:www-data /var/www/&amp;lt;koken&amp;gt; -R &#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Test config and reload Nginx service.&lt;/p&gt;&#xA;&lt;pre&gt;&lt;code&gt;sudo nginx -t &amp;amp;&amp;amp; sudo service nginx reload&#xA;&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;p&gt;Open the browser again on &lt;code&gt;//&amp;lt;host&amp;gt;&lt;/code&gt; and install the Koken application.&lt;/p&gt;&#xA;&lt;h1 id=&#34;source&#34;&gt;Source&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://gist.github.com/bradleyboy/26ffd2ec7da68919ecd1&#34;&gt;nginx rewrite setup for Koken&lt;/a&gt;&lt;/p&gt;</description>
    </item>
    <item>
      <title>Add Piwik tracking code to your Koken site</title>
      <link>https://janikvonrotz.ch/2015/08/19/add-piwik-tracking-code-to-your-koken-site/</link>
      <pubDate>Wed, 19 Aug 2015 08:38:41 +0000</pubDate>
      <guid>https://janikvonrotz.ch/2015/08/19/add-piwik-tracking-code-to-your-koken-site/</guid>
      <description>&lt;p&gt;Sadly there&amp;rsquo;s no native Piwik plugin for the Koken photography CMS.&#xA;However you can use another plugin the inject the tracking code to the footer of your site.&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Install the &lt;strong&gt;HTML Injector&lt;/strong&gt; plugin (Site &amp;gt; Settings &amp;gt; Plugin &amp;gt; Download Plugins).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Enable&lt;/strong&gt; the &lt;strong&gt;plugin&lt;/strong&gt; (Site &amp;gt; Settings &amp;gt; Plugin &amp;gt; HTML injector &amp;gt; Enable).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Setup&lt;/strong&gt; the &lt;strong&gt;plugin&lt;/strong&gt; (Site &amp;gt; Settings &amp;gt; Plugin &amp;gt; HTML injector &amp;gt; Setup).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Copy&lt;/strong&gt; the &lt;strong&gt;tracking code&lt;/strong&gt; of your Piwik site (Piwik &amp;gt; Administration &amp;gt; Websites &amp;gt; [site] &amp;gt; View Tracking code).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Paste&lt;/strong&gt; the &lt;strong&gt;code&lt;/strong&gt; into the &lt;strong&gt;footer field&lt;/strong&gt; and save it.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;Well done, your visitors are tracked now.&lt;/p&gt;&#xA;&lt;h1 id=&#34;source&#34;&gt;Source&lt;/h1&gt;&#xA;&lt;p&gt;&lt;a href=&#34;http://lars-mielke.de/4333/piwik-integration-in-koken/&#34;&gt;lars-mielke.de - Piwik Integration in Koken&lt;/a&gt;&lt;/p&gt;&#xA;</description>
    </item>
  </channel>
</rss>
