title: Installing h5ai on apache
body: <p>I am new to linux admin. I have an ec2 instance running apache. I have unpacked <a href="http://larsjung.de/h5ai/" rel="nofollow">h5ai</a> to the correct folder however it fails to resolve the correct url for the h5ai resources.</p>
  
  <p>I get the following 404 resource load errors (chrome)</p>
  
  <pre><code>http://www.mysite.net/static/%3C?=%20APP_HREF%20?%3Eclient/css/styles.css
  http://www.mysite.net/static/%3C?=%20APP_HREF%20?%3Eclient/js/scripts.js
  </code></pre>
  
  <p>In addition looking at the page source I have the following</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;&lt;!--[if lt IE 10]&gt;&lt;html class="no-js no-browser" lang="en"&gt;&lt;![endif]--&gt;&lt;!--[if gt IE 9]&gt;&lt;!--&gt;&lt;html lang="en" class="no-js browser"&gt;&lt;!--&lt;![endif]--&gt;&lt;head&gt;&lt;meta charset="utf-8"&gt;&lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;&lt;title&gt;index · powered by h5ai 0.25.1 (http://larsjung.de/h5ai/)&lt;/title&gt;&lt;meta name="description" content="index - powered by h5ai 0.25.1 (http://larsjung.de/h5ai/)"&gt;&lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;&lt;link rel="shortcut icon" href="&lt;?= APP_HREF ?&gt;client/images/favicon/favicon-16-32.ico"&gt;&lt;link rel="apple-touch-icon-precomposed" type="image/png" href="&lt;?= APP_HREF ?&gt;client/images/favicon/favicon-152.png"&gt;&lt;link rel="stylesheet" href="&lt;?= APP_HREF ?&gt;client/css/styles.css"&gt;&lt;script src="&lt;?= APP_HREF ?&gt;client/js/scripts.js" data-module="main"&gt;&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;div id="topbar" class="clearfix"&gt;&lt;ul id="navbar"&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div id="bottombar" class="clearfix"&gt;&lt;span class="left"&gt;&lt;span class="noJsMsg"&gt;⚡ JavaScript disabled! ⚡&lt;/span&gt;&lt;span class="noBrowserMsg"&gt;⚡ Works best in &lt;a href="http://browsehappy.com"&gt;modern browsers&lt;/a&gt;! ⚡&lt;/span&gt;&lt;/span&gt;&lt;span class="right"&gt;&lt;a href="http://larsjung.de/h5ai/" title="h5ai 0.25.1 · a modern HTTP web server index"&gt;powered by h5ai 0.25.1&lt;/a&gt;&lt;/span&gt;&lt;span class="center"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div id="sidebar"&gt;&lt;div id="settings"&gt;&lt;/div&gt;&lt;/div&gt;&lt;div id="fallback"&gt;&lt;?= FALLBACK ?&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>When I look at the developers <a href="http://larsjung.de/h5ai/sample/" rel="nofollow">example page</a> source the following;</p>
  
  <pre><code>&lt;?= APP_HREF ?&gt;
  </code></pre>
  
  <p>Has been substituted for the application location, <code>/_h5ai/</code>. I know that php is running on my server because wordpress and a page test.php with content <code>&lt;?php phpinfo() ?&gt;</code> work fine.</p>
  
  <p>I have had some fun with file permissions on this server (setting up wordpress and FTP) could this lead to my problems? I.e, the server 'apache' has write permissions for the wordpress folder <code>/www/html/blog</code> (so I can auto install themes etc). But for FTP (using filezilla) the user 'ec2-user' has write permissions for the rest of <code>/www/html</code>.</p>
  
  <p>Any help much appreciated.</p>