gpt4 book ai didi

ruby - Puppet 仪表板 - 禁止目录索引

转载 作者:数据小太阳 更新时间:2023-10-29 06:50:52 25 4
gpt4 key购买 nike

我在启动 Puppet Dashboard UI 时也遇到了问题,下面是我的配置文件。谁能帮我解决这个问题。

我得到的错误:

[Thu Aug 20 05:25:09 2015] [error] [client 192.168.XXX.XXX] 目录索引被 Options 指令禁止:/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) 在/etc/httpd/conf.d/welcome.conf改变:

Options -IndexesOptions Indexes(您可能想完全注释掉这些行 - 取决于您的具体需要)。

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

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

关于ruby - Puppet 仪表板 - 禁止目录索引,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32128544/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com