<html><head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1"></head><body
style="font-family: DIN-Regular;" bgcolor="#FFFFFF" text="#000000">
<div style="font-family: DIN-Regular;"><div class="moz-text-html"
lang="x-western">
<div style="font-family: DIN-Regular;"><span style="font-family:
DIN-Regular;">Hello,<br><br>I have created a webportal for my server
installation and configuration functions with Dancer1. Now I want to add
ldap user support and I think this is the opportunity to migrate to
Dancer2.<br><br>First I created a webapp with <br><br></span><small><span
style="font-family: monospace;">dancer2 gen -a "fsi" -p /opt/test/</span></small><span
style="font-family: DIN-Regular;"><small><br></small><br>After that I
move the environment and config yml files to the etc dir and delete the
environments dir. I want a clean root dir and so I move the rest of the
files to the new doc dir.<br></span><small><br style="font-family:
monospace;"><span style="font-family: monospace;">[root@fsisrv6 fsi]#
pwd<br>/opt/test/fsi<br>[root@fsisrv6 fsi]# tree</span><br
style="font-family: monospace;"><span style="font-family: monospace;">.</span><br
style="font-family: monospace;"><span style="font-family: monospace;">├──
bin</span><br style="font-family: monospace;"><span style="font-family:
monospace;">│ └── app.psgi</span><br style="font-family: monospace;"><span
style="font-family: monospace;">├── doc</span><br style="font-family:
monospace;"><span style="font-family: monospace;">│ ├── cpanfile</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
├── Makefile.PL</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ ├── MANIFEST</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
└── MANIFEST.SKIP</span><br style="font-family: monospace;"><span
style="font-family: monospace;">├── etc</span><br style="font-family:
monospace;"><span style="font-family: monospace;">│ ├── config.yml</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
├── development.yml</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ └── production.yml</span><br
style="font-family: monospace;"><span style="font-family: monospace;">├──
lib</span><br style="font-family: monospace;"><span style="font-family:
monospace;">│ └── fsi.pm</span><br style="font-family: monospace;"><span
style="font-family: monospace;">├── public</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
├── 404.html</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ ├── 500.html</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
├── css</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ │ ├── error.css</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
│ └── style.css</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ ├── dispatch.cgi</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
├── dispatch.fcgi</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ ├── favicon.ico</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
├── images</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ │ ├── perldancer-bg.jpg</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
│ └── perldancer.jpg</span><br style="font-family: monospace;"><span
style="font-family: monospace;">│ └── javascripts</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
└── jquery.js</span><br style="font-family: monospace;"><span
style="font-family: monospace;">├── t</span><br style="font-family:
monospace;"><span style="font-family: monospace;">│ ├── 001_base.t</span><br
style="font-family: monospace;"><span style="font-family: monospace;">│
└── 002_index_route.t</span><br style="font-family: monospace;"><span
style="font-family: monospace;">└── views</span><br style="font-family:
monospace;"><span style="font-family: monospace;"> ├── index.tt</span><br
style="font-family: monospace;"><span style="font-family: monospace;">
└── layouts</span><br style="font-family: monospace;"><span
style="font-family: monospace;"> └── main.tt</span></small><span
style="font-family: DIN-Regular;"><br><br>From my Dancer1 project, I
copy the three set lines to the fsi.pm file:<br><br></span><small><span
style="font-family: monospace;"><small><span style="font-family:
monospace;">- - --- -- --- -- - ----</span></small><br>package fsi;</span><br
style="font-family: monospace;"><span style="font-family: monospace;">use
Dancer2;</span><br style="font-family: monospace;"><br
style="font-family: monospace;"><span style="font-family: monospace;
color: rgb(47, 167, 234);">set confdir =>
"/opt/test/fsi/etc";</span><br style="font-family: monospace; color:
rgb(47, 167, 234);"><span style="font-family: monospace; color: rgb(47,
167, 234);">set envdir => "/opt/test/fsi/etc";</span><br
style="font-family: monospace; color: rgb(47, 167, 234);"><span
style="font-family: monospace; color: rgb(47, 167, 234);">set
environment => 'development';</span><br style="font-family:
monospace;"><br style="font-family: monospace;"><span
style="font-family: monospace;">our $VERSION = '0.1';</span><br
style="font-family: monospace;"><br style="font-family: monospace;"><span
style="font-family: monospace;">get '/' => sub {</span><br
style="font-family: monospace;"><span style="font-family: monospace;">
template 'index';</span><br style="font-family: monospace;"><span
style="font-family: monospace;">};</span><br style="font-family:
monospace;"><br style="font-family: monospace;"><span
style="font-family: monospace;">true;</span></small><span
style="font-family: DIN-Regular;"><br></span><small><span
style="font-family: monospace;"><small><span style="font-family:
monospace;">- - --- -- --- -- - ----</span></small></span></small><br><span
style="font-family: DIN-Regular;"><br>If I now start the portal with<br><br></span><small><span
style="font-family: monospace;">plackup -s Starman --workers=10 -a
/opt/test/fsi/bin/app.psgi -p 3000</span></small><span
style="font-family: DIN-Regular;"><br><br>I see in the "Your
application's environment" section:<br><br> <span style="font-style:
italic;"> Location: /opt/test/fsi</span><br style="font-style:
italic;"><span style="font-style: italic;"> Template engine: <%
settings.template %></span><br style="font-style: italic;"><span
style="font-style: italic;"> Logger: <% settings.logger %></span><br
style="font-style: italic;"><span style="font-style: italic;">
Environment: <% settings.environment %></span><br><br>So I think
Dancer2 cannot find the config.yml file. I read that I must create a
.dancer file in the etc dir:<br><br></span><small><span
style="font-family: monospace;">[root@fsisrv6 etc]# ls -lisa</span><br
style="font-family: monospace;"><span style="font-family: monospace;">insgesamt
20</span><br style="font-family: monospace;"><span style="font-family:
monospace;">5376363 4 drwxr-xr-x 2 root root <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">4096 19.</span></span>
Mai <span __postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">07:52</span></span>
.</span><br style="font-family: monospace;"><span style="font-family:
monospace;">5376297
4 drwxr-xr-x 9 root root <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">4096 19.</span></span>
Mai <span __postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">07:51</span>
..</span><br style="font-family: monospace;"><span style="font-family:
monospace;">5376359
4 -rw-r--r-- 1 root root <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">1414 19.</span>
Mai <span __postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">07:52</span></span>
config.yml</span><br style="font-family: monospace;"><span
style="font-family: monospace;">5376327
0 -rw-r--r-- 1 root root 0 19. Mai <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">07:49</span></span></span>
.dancer</span><br style="font-family: monospace;"><span
style="font-family: monospace;">5376361
4 -rw-r--r-- 1 root root 727 19. Mai <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">07:49</span></span></span>
development.yml</span><br style="font-family: monospace;"><span
style="font-family: monospace;">5376352
4 -rw-r--r-- 1 root root 302 19. Mai <span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;"><span
__postbox-detected-content="__postbox-detected-date"
class="__postbox-detected-content __postbox-detected-date"
style="display: inline; font-size: inherit; padding: 0pt;">07:49</span></span></span>
production.yml</span><br style="font-family: monospace;"></small><span
style="font-family:
DIN-Regular;"><br>But that does not work. What am I doing wrong? Who can
help, please?<br><br>Thank you & Regards<br> Jochen<br><br><br>PS:
<br>env infos: <br> - CentOS 6 and 7<br> - Dancer2 0.166001<br><br><br></span></div>
</div>
</div>
</body>
</html>