Puppet Dashboard - Directory Index Forbidden

2,091 views
Skip to first unread message

theirpuppet

unread,
Mar 9, 2012, 8:33:23 AM3/9/12
to puppet...@googlegroups.com
Hello all
 
Puppet, puppetmaster, ruby, etc installed from standard Ubuntu 11.10 x86_64 APT repos 
Apache config pulled from /usr/share/puppet-dashboard/ext/passenger/dashboard-vhost.conf

My simple test with webbrick worked a treat. So I installed Apache and passenger mod (from Ubuntu APT repos) and that's where I had a problem. The error from Apache2 error log: 
[Fri Mar 09 13:09:35 2012] [error] [client 1.2.3.4] Directory index forbidden by Options directive: /usr/share/puppet-dashboard/public/, referer: http://[IP ADDRESS]:3000/nodes/unchanged

Adding Options +Indexes is not the resolution as it just displays the static files in that directory.
 
Here's my /etc/apache2/sites-enabled/010-dashboard.conf:
#PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.11
PassengerRoot /usr/lib/phusion_passenger
PassengerRuby /usr/bin/ruby
# you may want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RailsAutoDetect On
<VirtualHost *:3000>
        ServerName FQDN
        ServerAlias X.X.X.X 
        DocumentRoot /usr/share/puppet-dashboard/public/
        <Directory /usr/share/puppet-dashboard/public/>
                Options None
                Order allow,deny
                allow from all
        </Directory>
  #ErrorLog /var/log/apache2/dashboard.example.com_error.log
  LogLevel warn
  #CustomLog /var/log/apache2/dashboard.example.com_access.log combined
  ServerSignature On
</VirtualHost>

The only thing I can think of is that I had connected via IP Address, not FQDN. So I've updated DNS but unfortunately I don't have control over my employer's resolvers. Thus I have to wait until the cached failure expires - or bother the team responsible... 

Any and all ideas are welcome. I think it's either the DNS issue or something wrong with Passenger?

Thanks
David

fsalum

unread,
Mar 15, 2012, 11:29:22 PM3/15/12
to Puppet Users
Try to add the 2 lines below inside your virtualhost

<VirtualHost *:3000>
SetEnv RAILS_ENV production
RackBaseURI /
.......
</VirtualHost>

Don't forget to restart apache.

[]s
Felipe

On Mar 9, 6:33 am, theirpuppet <theirpup...@gmail.com> wrote:
> Hello all
>
> Puppet, puppetmaster, ruby, etc installed from standard Ubuntu 11.10 x86_64
> APT repos
> Dashboard 1.26 from .deb pulled fromhttp://apt.puppetlabs.com/pool/oneiric/main/p/puppet-dashboard/
> Apache config pulled
> from /usr/share/puppet-dashboard/ext/passenger/dashboard-vhost.conf
>
> My simple test with webbrick worked a treat. So I installed Apache and
> passenger mod (from Ubuntu APT repos) and that's where I had a problem. The
> error from Apache2 error log:
>
> > [Fri Mar 09 13:09:35 2012] [error] [client 1.2.3.4] Directory index
> > forbidden by Options directive: /usr/share/puppet-dashboard/public/,
> > referer:http://[IPADDRESS]:3000/nodes/unchanged

theirpuppet

unread,
Mar 19, 2012, 8:34:39 AM3/19/12
to puppet...@googlegroups.com
Thanks, however this still doesn't work.

From error log:
[Mon Mar 19 12:29:00 2012] [error] [client X.X.X.X] Directory index forbidden by Options directive: /usr/share/puppet-dashboard/public/

And the current apache configuration:

root:~# cat /etc/apache2/sites-enabled/010-dashboard.conf 
# UPDATE THESE PATHS TO SUIT YOUR ENVIRONMENT
LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
#PassengerRoot /var/lib/gems/1.8/gems/passenger-2.2.11
PassengerRoot /usr/lib/phusion_passenger
PassengerRuby /usr/bin/ruby

# you may want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RailsAutoDetect On

<VirtualHost *:3000>
        ServerName X.X.X
                ServerAlias X.X.X.X
        DocumentRoot /usr/share/puppet-dashboard/public/
                RailsBaseURI /
                SetEnv Rails_ENV production
                PassengerEnabled on
        <Directory /usr/share/puppet-dashboard/public/>
                Options -MultiViews -Indexes FollowSymLinks

Antidot SAS

unread,
Mar 19, 2012, 10:52:06 AM3/19/12
to puppet...@googlegroups.com
HI,

I had exactly the same issue last week when I wanted to create a vhost for the puppet dashboard, I finally wasn't able to resolve the issue. And if you change the directive in '+Indexes', the ruby code is not correctly executed.


Any help is alos appareached.

Regards,
JM


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/fgfDMT0_1xMJ.

To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

Felipe Salum

unread,
Mar 19, 2012, 12:11:39 PM3/19/12
to puppet...@googlegroups.com
I had the same issue too, so I had to make a few changes on my virtualhost to work. Try changing your Options to None and confirm that your PassengerRoot and module path are correct.

I'm attaching my working virtualhost for you to compare:


LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so
PassengerRoot /usr
PassengerRuby /usr/bin/ruby


<VirtualHost *:3000>
        SetEnv RAILS_ENV production
        RackBaseURI /

        ServerName X.X.X.X

        DocumentRoot /usr/share/puppet-dashboard/public/
        <Directory /usr/share/puppet-dashboard/public/>
                Options None
                Order allow,deny
                allow from all
        </Directory>
....
</VirtualHost>

Felipe

theirpuppet

unread,
Mar 19, 2012, 1:06:40 PM3/19/12
to puppet...@googlegroups.com
And like magic, I made three changes, and it works.  Thanks a lot!

First, because mod_passenger was being loaded already by the standard Apache config, I just let Apache use it. 
- LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
+ #LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so

Second, I changed PassengerRoot to match your setup.  
- PassengerRoot /usr/lib/phusion_passenger 
+ #PassengerRoot /usr/lib/phusion_passenger
+ PassengerRoot /usr

Third I set Options to None (also to match your setup). I previously had Options set to None, so I'm not really sure if this was the big game changer. But I'm sticking to it for now as it works!

Thanks again
David
JM


To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.

--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send email to puppet...@googlegroups.com.
To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com.

Kiran Sysadm

unread,
Aug 20, 2015, 6:40:34 PM8/20/15
to Puppet Users
Hello all,

I also have similar issue with launching the Puppet Dashboard UI, Below is my config file. Please can anyone help me on this issue.

Error I am getting : [Thu Aug 20 05:25:09 2015] [error] [client 192.168.XXX.XXX] Directory index forbidden by Options directive: /usr/share/puppet-dashboard/public/
Below is my VirtualHost file.

# UPDATE THESE PATHS TO SUIT YOUR ENVIRONMENT
#LoadModule passenger_module /var/lib/gems/1.8/gems/passenger-2.2.11/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-5.0.15
PassengerRuby /usr/
#PassengerRuby /usr/bin/ruby

# you may want to tune these settings
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
#RailsAutoDetect On
Listen 3000

<VirtualHost *:3000>
        ServerName puppetma.domain.net
        ServerAlias puppetma
        DocumentRoot /usr/share/puppet-dashboard/public/
<Directory /usr/share/puppet-dashboard/public/>
                Options None
                Order allow,deny
                allow from all
        </Directory>
  ErrorLog /var/log/httpd/puppet-dashboard_error.log
  LogLevel warn
  CustomLog /var/log/httpd/puppet-dashboard_access.log combined
  ServerSignature On

I could see my DNS is absolutely working fine,  I have also ensured stopping my host level firewall and selinux.

Thanks,
Kiran
Reply all
Reply to author
Forward
0 new messages