puppet-dashboard missing CSS/JS references in Apache

175 views
Skip to first unread message

Michael Altfield

unread,
Jun 12, 2012, 4:02:44 PM6/12/12
to puppet...@googlegroups.com
Hi,

I finally got puppet-dashboard installed and working under Apache (v2.2.15) on my CentOS 6 Puppet Master. It looks fine when running under WEBrick, but when I run it under apache, it looks terrible (read: the HTML source is different for some reason, leaving out some javascript & css reference links from the <head/> stanza).

Here's the contents of the HTML <head/> stanza when running puppet-dashboard using /usr/share/puppet-dashboard/script/server (ie: using WEBrick):

  <head>
    <title>Puppet Node Manager</title>
    <link href='/images/favicon.ico?1337635175' rel='shortcut icon' />
    <meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
    <script src="/javascripts/jquery.min.js?1337635175" type="text/javascript"></script>
    <script type='text/javascript'>
        //<![CDATA[
          var relative_url_root = '';
          $.noConflict();
        //]]>
      </script>
    <link href="/stylesheets/reset.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/layout.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/forms.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/tables.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/jquery.ui.custom.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/jquery.ui.combobox.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/typography.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/links.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/token-input-facebook.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/tipsy.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/application.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/colorbox.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
      <link href="/stylesheets/help.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
    <script src="/javascripts/prototype.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery-ui.min.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery.tokeninput.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/excanvas.min.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/raphael-min.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/grafico.min.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery.form.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery.placeholders.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery.ui.combobox.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery.colorbox.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/jquery.tipsy.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/search.js?1337635175" type="text/javascript"></script>
      <script src="/javascripts/application.js?1337635175" type="text/javascript"></script>
  </head>

And here's the contents of the HTML <head/> stanza when running puppet-dashboard using passenger under Apache:

<head>
<title>Puppet Node Manager</title>
<link href='/images/favicon.ico?1337635175' rel='shortcut icon' />
<meta content='text/html; charset=UTF-8' http-equiv='Content-Type' />
<script src="/javascripts/jquery.min.js?1337635175" type="text/javascript"></script>
<script type='text/javascript'>
  //<![CDATA[
    var relative_url_root = '';
    $.noConflict();
  //]]>
</script>
<link href="/stylesheets/all.css?1337635175" media="screen" rel="stylesheet" type="text/css" />
<script src="/javascripts/all.js?1337635175" type="text/javascript"></script>
</head>

Here's what puppet-dashboard looks like under Apache:


I've attached the entire HTML source from puppet-dashboard running under WEBrick as webrick.html and the entire HTML output running under Apache as httpd.html.

TIA
webrick.html
httpd.html

Scott Merrill

unread,
Jun 12, 2012, 4:14:11 PM6/12/12
to puppet...@googlegroups.com
On Tue, Jun 12, 2012 at 4:02 PM, Michael Altfield
<michael.altf...@gmail.com> wrote:
> I finally got puppet-dashboard installed and working under Apache
> (v2.2.15) on my CentOS 6 Puppet Master. It looks fine when running under
> WEBrick, but when I run it under apache, it looks terrible (read: the HTML
> source is different for some reason, leaving out some javascript & css
> reference links from the <head/> stanza).

Check the ownership and permissions on
/usr/share/puppet-dashboard/public/javascript/all.js and
/usr/share/puppet-dashboard/public/stylesheets/all.css

See also this bug report:
https://projects.puppetlabs.com/issues/9676

Michael Altfield

unread,
Jun 12, 2012, 5:02:56 PM6/12/12
to puppet...@googlegroups.com
Ah, the files were owned by puppet-dashboard:puppet-dashboard 760. I changed them to apache:apache 600, and everything works. Thanks!


On Tuesday, June 12, 2012 4:14:11 PM UTC-4, Scott Merrill wrote:
On Tue, Jun 12, 2012 at 4:02 PM, Michael Altfield

Michael Altfield

unread,
Jun 12, 2012, 5:07:48 PM6/12/12
to puppet...@googlegroups.com
Also did a:

# add user apache to the puppet-dashboard group to resolve https://projects.puppetlabs.com/issues/9676
gpasswd -a apache puppet-dashboard

just in case 
Reply all
Reply to author
Forward
0 new messages