title: OpenResty require cannot find modules
body: <p>After Apache has failed me miserably, I decided to go the OpenResty route.
  So far, the Lua code is executing, however I opted to separate the generation in to multiple modules, to make the code more readable.</p>
  
  <pre><code>-- Define modules table
  local modules = {
      head = require("head"),
      header = require("scripts.header"),
      leftNav = require(".scripts.leftnav")
  }
  </code></pre>
  
  <p>I've tried several methods of requiring files;
   - I've taken one file out of the /scripts/ directory, and moved it to the root directory, file cannot be found
   - I've tried referencing the /scripts/ directory with/out a period beforehand
  and all is to no avail. The modules simply aren't found.</p>
  
  <p>Is there some kind of special trick I need to find these files?</p>
  
  <p>Here is an excerpt from the error log:</p>
  
  <pre><code>stack traceback:
  coroutine 0:
      [C]: in function 'require'
      ./html/mailarchive/index.lua:10: in function &lt;./html/mailarchive/index.lua:1&gt;, client: 127.0.0.1, server: localhost, request: "GET / HTTP/1.1", host: "localhost"
  2017/05/12 10:26:13 [error] 113864#120792: *14 lua entry thread aborted: runtime error: ./html/mailarchive/index.lua:10: module 'head' not found:
      no field package.preload['head']
      no file './site/lualib/head.lua'
      no file './site/lualib/head/init.lua'
      no file './lualib/head.lua'
      no file './lualib/head/init.lua'
      no file '.\head.lua'
      no file 'C:\nginx\lualib\head.lua'
      no file 'C:\nginx\lua\head.lua'
      no file 'C:\nginx\lua\head\init.lua'
      no file 'C:\Program Files (x86)\Lua\5.1\lua\head.luac'
      no file './site/lualib/head.so'
      no file './lualib/head.so'
      no file '.\head.dll'
      no file 'C:\nginx\lualib\head.so'
      no file 'C:\nginx\head.dll'
      no file 'C:\nginx\loadall.dll'
  stack traceback:
  coroutine 0:
      [C]: in function 'require'
      ./html/mailarchive/index.lua:10: in function &lt;./html/mailarchive/index.lua:1&gt;, client: 127.0.0.1, server: localhost, request: "GET /favicon.ico HTTP/1.1", host: "localhost", referrer: "http://localhost/"
  </code></pre>