22

新しい apache と munin サーバーのインストールで、domain.com/munin に移動すると、このエラーが発生します。

Forbidden

You don't have permission to access /munin on this server.

これらのディレクトリに対して、 chown -R munin:munin を実行しました

dbdir /var/lib/munin
htmldir /var/cache/munin/www
logdir /var/log/munin
rundir  /var/run/munin

Apacheで何をすべきですか?/etc/init.d/apache restart で apache を再表示しましたが、それでも禁止されます。Apacheの新規インストールから、Apache構成ファイルに変更を加えていません。

4

12 に答える 12

44

アパッチ < 2.4

Munin Apache 構成ファイルを開きます。

vim /etc/munin/apache.conf

次の行を変更します。

Order allow,deny
Allow from localhost 127.0.0.0/8 ::1
Options None

そのようです:

Order allow,deny
Allow from all
Options FollowSymLinks SymLinksIfOwnerMatch

Apache を再起動すると、ゴールデン状態になります。

アパッチ > 2.4

Munin Apache 構成ファイルを開きます。

vim /etc/munin/apache24.conf

次の行を変更します。

Require local   
Options None   

そのようです:

Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch

Apache を再起動すると、ゴールデン状態になります。

sudo service apache2 restart
于 2012-08-21T15:15:49.947 に答える
7

私は同じ問題を抱えていましたが、アドバイスはどれも役に立ちませんでした。そこで、ディレクトリ ツリーを少しブラウズしたところ、apache24.conf ファイルが見つかりました。したがって、j7nn7k が説明したように、この /etc/munin/apache24.conf ファイルに以下を追加しました。

Require all granted
Options FollowSymLinks SymLinksIfOwnerMatch

もちろん、古い値は削除しました。今それは働いています!

于 2015-05-18T08:59:40.770 に答える
4

それが同じ問題かどうかはわかりませんが、それを修正する解決策を見つけました。

ここのチュートリアル(イタリアのubuntu wikiから)に従い、文字列を次のように変更しました。

htmldir /var/cache/munin/www

に:

htmldir /var/www/munin

次に、ファイルを編集しました。

vim /etc/munin/apache.conf

Johe Greenがしたように、すべてから許可します。ただし、munin conf で htmldir パスとして変更する必要があるため、ディレクトリ パスをよく見てください。

Alias /munin /var/www/munin

<Directory /var/www/munin>
    Order allow, deny
    Allow from all

    [...]
于 2012-11-15T11:43:26.207 に答える
3

Ubuntu 12.04LTSにapache2、munin、およびmunin-nodeをクリーンインストールした後、同じ問題が発生しました。上記の提案されたすべてのオプションを試してみましたが、効果はありませんでした。結局、私がしなければならなかったことがわかりました

chmod 755 /var/www/munin
chown -R munin:munin /var/www/munin

それは私のためにそれを解決しました。

CD /パブ

もっとビール

于 2013-08-09T02:46:48.463 に答える
0

ルート ドキュメントの下に「共有」という名前のソフト リンクを作成し、/Users/me/desktop/share のようなパッケージを指すようにすると、同じ問題が発生します。

最初に chmod 655 /Users/me/desktop/share を実行します。動作しません。次に chmod 655 /Users/me/desktop を実行します。

ルート ドキュメント パスの下に「共有」が表示されます。

私はMac Yosemite 10.10.3を使用しており、ビルドApache 2.4に組み込まれています。

于 2015-10-30T01:59:08.470 に答える
0

Ubuntu 14.04 を使用した OP と apt-get で利用可能なストック バージョンと同じ問題を抱えていました。Ubuntu の公式ドキュメントDigitalOcean の手順を試しましたが、グラフを表示できませんでした (403 エラー)。おそらくランダムなバグだったので、muninをアンインストール(パージ)/再インストールしました。このhowtoforge の記事をたどったとき、私はついに幸運に恵まれました。から munin データを移動することを目的としていませ/var/cache/munin/www。むしろ、次のことを保証します。

  1. 追加のプラグインがインストールされます:apt-get install munin munin-node munin-plugins-extra
  2. Apache fcgid が有効になっています。a2enmod fcgid
  3. スパース/etc/munin/apache.confファイルが使用されます (以下を参照)。

/etc/munin/apache.confファイルの内容全体を次のように置き換えます。

Alias /munin /var/cache/munin/www
<Directory /var/cache/munin/www>
 # Require local
 Require all granted
 Options FollowSymLinks SymLinksIfOwnerMatch
 Options None
</Directory>

ScriptAlias /munin-cgi/munin-cgi-graph /usr/lib/munin/cgi/munin-cgi-graph
<Location /munin-cgi/munin-cgi-graph>
 # Require local
 Require all granted
 Options FollowSymLinks SymLinksIfOwnerMatch
 <IfModule mod_fcgid.c>
 SetHandler fcgid-script
 </IfModule>
 <IfModule !mod_fcgid.c>
 SetHandler cgi-script
 </IfModule>
</Location>
于 2016-02-26T15:47:59.367 に答える
0

これは、Linux Mint 17.3 (kernal 3.19) に Munin をインストールするための完全なインストール手順であり、最近の Ubuntu でも動作するはずです。

Monit とは異なり、Munin には独自の Web サーバーがないため、インストールが少し複雑です。

#!/bin/bash
# Install script for Apache 2 with MySQL, PHP 5, etc.
# Update the Package Lists
apt-get update
# Install the MySQL Server and Client before installing Apache
apt-get install mysql-server mysql-client
# Install Apache
apt-get install apache2
# Install PHP5
apt-get install php5 libapache2-mod-php5
# Restart Apache
/etc/init.d/apache2 restart
# Install some extras
apt-get install snmp php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
# Once again, restart
/etc/init.d/apache2 restart
# Install the Munin Server and the Client
apt-get install munin munin-node
# Restart the machine
shutdown -r now

アンインストール部分を無視して、/etc/munin/apache.conf ファイルの内容全体を、このスレッドの前半で hamx0r が述べているように置き換えます (彼の投稿に投票してください)。

https://stackoverflow.com/a/35656044/5178979

「すべてから許可」は理にかなっていますが、機能しなくなりました。

Apache2 をインストールする前に Munin をインストールしたためか、次のシンボリック リンクがありませんでした。

/etc/apache2/conf-available/munin.conf -> ../../munin/apache.conf

/etc/apache2/conf-enabled/munin.conf -> ../conf-available/munin.conf

cd /etc/apache2/conf-available && ll

リンクが表示されない場合は、作成します。

ln -s ../../munin/apache.conf munin.conf && ll

最初のファイルが欠落している場合、このファイルも欠落している可能性があります

cd /etc/apache2/conf-enabled/ && ll

リンクを作成します。

ln -s ../conf-available/munin.conf munin.conf && ll    

Apache2 を再起動し、5 分間待ちます。うまくいくことを願っています。

Munin を実行しているマシン以外のマシンを監視する場合は、単に munin-node をインストールしてから、/etc/munin/munin-node.conf に行を追加します。

この行を見つけます

許可^127.0.0.1$

次のような munin サーバーのアドレスを含む別の同様の行を追加します。

許可^192.168.1.100$

これは、munin-node を実行している Windows クライアントには必要ありません。

監視したいマシンをMuninサーバーに追加することを忘れないでください

/etc/munin/munin.conf

# MyMachine
[MyMachineName.mydomain]
address 127.0.0.1
use_node_name yes

それでは、専門家への質問です。一部のマシンがハード ドライブの温度を報告しないのはなぜですか? それは漠然とした質問であり、おそらく詳細が必要であることは承知しています。

于 2016-08-14T13:27:48.183 に答える
0

私は同じ問題を抱えていて、それを解決しました。

私は Apache 2.4.18 で Munin を使用していたので、の構成ファイル ( /etc/munin/apache24.conf ) を編集する必要がありました。

/etc/munin/apache.conf を編集しても効果はありませんでした。

于 2016-07-01T06:42:31.903 に答える
-1

/etc/munin/apache.conf を編集し、 に続く 4 行のコメントを外しますAuthUserFile

    AuthUserFile /etc/munin/.htpasswd
    AuthName "Munin"
    AuthType Basic
    require valid-user
于 2012-06-09T13:47:08.133 に答える