theirpuppet
2012-Mar-09 13:31 UTC
[Puppet Users] Puppet Dashboard - Directory Index Forbidden
Hello all Puppet, puppetmaster, ruby, etc installed from standard Ubuntu 11.10 x86_64 APT repos Dashboard 1.26 from .deb pulled from http://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://[IP ADDRESS]:3000/nodes/unchangedAdding 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 pm1.lon6.telecity.net >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 -- 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/-/Et26hzzZekEJ. To post to this group, send email to puppet-users@googlegroups.com. 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.
theirpuppet
2012-Mar-09 13:33 UTC
[Puppet Users] Puppet Dashboard - Directory Index Forbidden
Hello all Puppet, puppetmaster, ruby, etc installed from standard Ubuntu 11.10 x86_64 APT repos Dashboard 1.26 from .deb pulled from http://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://[IP ADDRESS]:3000/nodes/unchangedAdding 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 -- 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/-/PxpEVKfKiVUJ. To post to this group, send email to puppet-users@googlegroups.com. 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.
fsalum
2012-Mar-16 03:29 UTC
[Puppet Users] Re: Puppet Dashboard - Directory Index Forbidden
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
>
> 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
--
You received this message because you are subscribed to the Google Groups
"Puppet Users" group.
To post to this group, send email to puppet-users@googlegroups.com.
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.
theirpuppet
2012-Mar-19 12:34 UTC
[Puppet Users] Re: Puppet Dashboard - Directory Index Forbidden
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
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>
--
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-users@googlegroups.com.
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.
Antidot SAS
2012-Mar-19 14:52 UTC
Re: [Puppet Users] Re: Puppet Dashboard - Directory Index Forbidden
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 On Mon, Mar 19, 2012 at 1:34 PM, theirpuppet <theirpuppet@gmail.com> wrote:> 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 > 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> > > > -- > 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-users@googlegroups.com. > 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-users@googlegroups.com. 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.
Felipe Salum
2012-Mar-19 16:11 UTC
Re: [Puppet Users] Re: Puppet Dashboard - Directory Index Forbidden
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
On Mon, Mar 19, 2012 at 7:52 AM, Antidot SAS <antidotsas@gmail.com> wrote:
> 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
>
>
> On Mon, Mar 19, 2012 at 1:34 PM, theirpuppet
<theirpuppet@gmail.com>wrote:
>
>> 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
>> 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>
>>
>>
>> --
>> 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-users@googlegroups.com.
>> 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-users@googlegroups.com.
> 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-users@googlegroups.com.
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.
theirpuppet
2012-Mar-19 17:06 UTC
Re: [Puppet Users] Re: Puppet Dashboard - Directory Index Forbidden
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 On Monday, March 19, 2012 4:11:39 PM UTC, fsalum wrote:> > 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 > > On Mon, Mar 19, 2012 at 7:52 AM, Antidot SAS <antidotsas@gmail.com> wrote: > >> 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 >> >> >> On Mon, Mar 19, 2012 at 1:34 PM, theirpuppet <theirpuppet@gmail.com>wrote: >> >>> 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 >>> 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> >>> >>> >>> -- >>> 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-users@googlegroups.com. >>> 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-users@googlegroups.com. >> 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 view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/M19hCYSYGOcJ. To post to this group, send email to puppet-users@googlegroups.com. 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.