Puppet Dashboard - 禁止使用目录索引

时间:2015-08-20 21:16:48

标签: ruby apache user-interface puppet dashboard

我也有关于启动Puppet Dashboard UI的问题,下面是我的配置文件。有人可以帮我解决这个问题。

我收到错误:

[Thu Aug 20 05:25:09 2015] [error] [client 192.168.XXX.XXX] Directory index forbidden by Options directive: /usr/share/puppet-dashboard/public/

以下是我的VirtualHost文件。

# 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/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

我可以看到我的DNS工作正常,我也确保停止我的主机级防火墙和selinux。

由于

修改

[admin@$$$]$ pwd
/usr/share/puppet-dashboard/public
drwxr-xr-x  5 puppet-dashboard puppet-dashboard 4.0K Apr  3 17:46 .
drwxr-xr-x 17 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 ..
-rwxr-xr-x  1 puppet-dashboard puppet-dashboard 1006 Mar 21  2013 404.html
-rwxr-xr-x  1 puppet-dashboard puppet-dashboard  989 Mar 21  2013 422.html
-rwxr-xr-x  1 puppet-dashboard puppet-dashboard 1.2K Mar 21  2013 500.html
drwxr-xr-x  3 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 images
drwxr-xr-x  2 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 javascripts
-rwxr-xr-x  1 admin            admin             18K Apr  3 17:46 puppet_dashboard.sql
-rwxr-xr-x  1 puppet-dashboard puppet-dashboard   26 Mar 30 15:42 robots.txt
drwxr-xr-x  4 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 stylesheets

[admin@$$$]$ pwd
/usr/share/puppet-dashboard
drwxr-xr-x   17 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 .
drwxr-xr-x. 127 root             root             4.0K Apr  3 16:55 ..
drwxr-xr-x    7 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 app
drwxr-xr-x    2 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 bin
drwxr-xr-x    2 puppet-dashboard puppet-dashboard 4.0K Mar 21  2013 certs
drwxr-xr-x    5 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:59 config
drwxr-xr-x    3 puppet-dashboard puppet-dashboard 4.0K Mar 29 13:00 db
drwxr-xr-x    2 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 examples
drwxr-xr-x    4 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 ext
drwxr-xr-x    4 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 lib
drwxr-xr-x    2 puppet-dashboard puppet-dashboard 4.0K Mar 31 03:24 log
drwxr-xr-x    5 puppet-dashboard puppet-dashboard 4.0K Apr  3 17:46 public
-rwxrwxrwx    1 puppet-dashboard puppet-dashboard 1.7K Mar 21  2013 Rakefile
drwxr-xr-x    3 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 script
drwxr-xr-x   10 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 spec
drwxr-xr-x    2 puppet-dashboard puppet-dashboard 4.0K Mar 21  2013 spool
drwxr-xr-x    2 puppet-dashboard puppet-dashboard 4.0K Mar 21  2013 tmp
drwxr-xr-x    5 puppet-dashboard puppet-dashboard 4.0K Mar 29 11:39 vendor
-rw-r--r--    1 puppet-dashboard puppet-dashboard    7 Mar 21  2013 VERSION

1 个答案:

答案 0 :(得分:1)

也许这会有所帮助?

1)在/etc/httpd/conf.d/welcome.conf 改变:

Options -IndexesOptions Indexes(您可能希望完全注释掉这些行 - 取决于您究竟需要什么)。

2)第二件事可能只需要调整+x目录的/usr/share/puppet-dashboard/public/(执行)权限。

尝试运行chmod 777 /usr/share/puppet-dashboard/public/,这将为用户,群组,世界提供所有内容。完成后请不要忘记正确调整。如果要以递归方式运行chmod,请添加-R选项。