apache et nagios

apache et nagios - Linux et OS Alternatifs

Marsh Posté le 15-04-2004 à 10:51:45    

bonjour à tous
 
j ai voulu m'installer nagios sur ma bécane pour jouer un peu avec. j ai donc aussi installer apache2 ( apache2-mpm-threadpool ), j ai installé nagios et configurer sommairement  
je peut me logger sur http://127.0.0.1/nagios mais des que je veux executer un cgi-bin, le navigateur propose de le telecharger ...
 
le probleme dois venir de la conf d'apache mais j'y connais rien donc si quelqu'un pouvais m'aider ...
 

Code :
  1. </IfModule>
  2. User www-data
  3. Group www-data
  4. # The following directives define some format nicknames for use with
  5. # a CustomLog directive (see below).
  6. LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
  7. LogFormat "%h %l %u %t \"%r\" %>s %b" common
  8. LogFormat "%{Referer}i -> %U" referer
  9. LogFormat "%{User-agent}i" agent
  10. # Global error log.
  11. ErrorLog /var/log/apache2/error.log
  12. # Include module configuration:
  13. Include /etc/apache2/mods-enabled/*.load
  14. Include /etc/apache2/mods-enabled/*.conf
  15. # Include all the user configurations:
  16. Include /etc/apache2/httpd.conf
  17. # Include ports listing
  18. Include /etc/apache2/ports.conf
  19. # Include generic snippets of statements
  20. Include /etc/apache2/conf.d
  21. #include nagios
  22. #Include /etc/nagios/apache.conf
  23. ScriptAlias /cgi-bin/ /etc/nagios/cgi-bin/  
  24. #Let's have some Icons, shall we?
  25. Alias /icons/ "/usr/share/apache2/icons/"
  26. <Directory "/usr/share/apache2/icons">
  27.     Options Indexes MultiViews
  28.     AllowOverride None
  29.     Order allow,deny
  30.     Allow from all
  31. </Directory>
  32. <Directory "/usr/lib/cgi-bin/nagios/">
  33. Options ExecCGI
  34. Allow from all
  35. </Directory>
  36. # Set up the default error docs.
  37. #
  38. # Customizable error responses come in three flavors:
  39. # 1) plain text 2) local redirects 3) external redirects
  40. #
  41. # Some examples:
  42. #ErrorDocument 500 "The server made a boo boo."
  43. #ErrorDocument 404 /missing.html
  44. ErrorDocument 404 "/cgi-bin/missing_handler.pl"
  45. #ErrorDocument 402 http://www.example.com/subscription_info.html
  46. #
  47. #
  48. # Putting this all together, we can Internationalize error responses.
  49. #
  50. # We use Alias to redirect any /error/HTTP_<error>.html.var response to
  51. # our collection of by-error message multi-language collections.  We use  
  52. # includes to substitute the appropriate text.
  53. #
  54. # You can modify the messages' appearance without changing any of the
  55. # default HTTP_<error>.html.var files by adding the line;
  56. #
  57. #   Alias /error/include/ "/your/include/path/"
  58. #
  59. # which allows you to create your own set of files by starting with the
  60. # /usr/local/apache2/error/include/ files and
  61. # copying them to /your/include/path/, even on a per-VirtualHost basis.
  62. #
  63. <IfModule mod_negotiation.c>
  64. <IfModule mod_include.c>
  65.     Alias /error/ "/usr/share/apache2/error/"
  66.     <Directory "/usr/share/apache2/error">
  67.         AllowOverride None
  68.         Options IncludesNoExec
  69.         AddOutputFilter Includes html
  70.         AddHandler type-map var
  71.         Order allow,deny
  72.         Allow from all
  73.         LanguagePriority en es de fr
  74.         ForceLanguagePriority Prefer Fallback
  75.     </Directory>
  76.     ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
  77.     ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
  78.     ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
  79.     ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
  80.     ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
  81.     ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
  82.     ErrorDocument 410 /error/HTTP_GONE.html.var
  83.     ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
  84.     ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
  85.     ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
  86.     ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
  87.     ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  88.     ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
  89.     ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
  90.     ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
  91.     ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
  92.     ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var
  93. </IfModule>
  94. </IfModule>
  95. DirectoryIndex index.html index.cgi index.pl index.php index.xhtml
  96. UserDir public_html
  97. #<Directory /home/*/public_html>
  98. # AllowOverride FileInfo AuthConfig Limit
  99. # Options Indexes SymLinksIfOwnerMatch IncludesNoExec
  100. #</Directory>
  101. AccessFileName .htaccess
  102. <Files ~ "^\.ht">
  103.     Order allow,deny
  104.     Deny from all
  105. </Files>
  106. UseCanonicalName Off
  107. TypesConfig /etc/mime.types
  108. DefaultType text/plain
  109. HostnameLookups Off
  110. IndexOptions FancyIndexing VersionSort
  111. AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip
  112. AddIconByType (TXT,/icons/text.gif) text/*
  113. AddIconByType (IMG,/icons/image2.gif) image/*
  114. AddIconByType (SND,/icons/sound2.gif) audio/*
  115. AddIconByType (VID,/icons/movie.gif) video/*
  116. # This really should be .jpg.
  117. AddIcon /icons/binary.gif .bin .exe
  118. AddIcon /icons/binhex.gif .hqx
  119. AddIcon /icons/tar.gif .tar
  120. AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv
  121. AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip
  122. AddIcon /icons/a.gif .ps .ai .eps
  123. AddIcon /icons/layout.gif .html .shtml .htm .pdf
  124. AddIcon /icons/text.gif .txt
  125. AddIcon /icons/c.gif .c
  126. AddIcon /icons/p.gif .pl .py
  127. AddIcon /icons/f.gif .for
  128. AddIcon /icons/dvi.gif .dvi
  129. AddIcon /icons/uuencoded.gif .uu
  130. AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl
  131. AddIcon /icons/tex.gif .tex
  132. AddIcon /icons/bomb.gif core
  133. AddIcon /icons/back.gif ..
  134. AddIcon /icons/hand.right.gif README
  135. AddIcon /icons/folder.gif ^^DIRECTORY^^
  136. AddIcon /icons/blank.gif ^^BLANKICON^^
  137. # This is from Matty J's patch. Anyone want to make the icons?
  138. #AddIcon /icons/dirsymlink.jpg ^^SYMDIR^^
  139. #AddIcon /icons/symlink.jpg ^^SYMLINK^^
  140. DefaultIcon /icons/unknown.gif
  141. ReadmeName README.html
  142. HeaderName HEADER.html
  143. IndexIgnore .??* *~ *# HEADER* RCS CVS *,t
  144. AddEncoding x-compress Z
  145. AddEncoding x-gzip gz tgz
  146. AddLanguage da .dk
  147. AddLanguage nl .nl
  148. AddLanguage en .en
  149. AddLanguage et .et
  150. AddLanguage fr .fr
  151. AddLanguage de .de
  152. AddLanguage el .el
  153. AddLanguage it .it
  154. AddLanguage ja .ja
  155. AddLanguage pl .po
  156. AddLanguage ko .ko
  157. AddLanguage pt .pt
  158. AddLanguage no .no
  159. AddLanguage pt-br .pt-br
  160. AddLanguage ltz .ltz
  161. AddLanguage ca .ca
  162. AddLanguage es .es
  163. AddLanguage sv .se
  164. AddLanguage cz .cz
  165. AddLanguage ru .ru
  166. AddLanguage tw .tw
  167. AddLanguage zh-tw .tw
  168. LanguagePriority en da nl et fr de el it ja ko no pl pt pt-br ltz ca es sv tw
  169. AddDefaultCharset ISO-8859-1
  170. AddCharset ISO-8859-1  .iso8859-1  .latin1
  171. AddCharset ISO-8859-2  .iso8859-2  .latin2 .cen
  172. AddCharset ISO-8859-3  .iso8859-3  .latin3
  173. AddCharset ISO-8859-4  .iso8859-4  .latin4
  174. AddCharset ISO-8859-5  .iso8859-5  .latin5 .cyr .iso-ru
  175. AddCharset ISO-8859-6  .iso8859-6  .latin6 .arb
  176. AddCharset ISO-8859-7  .iso8859-7  .latin7 .grk
  177. AddCharset ISO-8859-8  .iso8859-8  .latin8 .heb  
  178. AddCharset ISO-8859-9  .iso8859-9  .latin9 .trk
  179. AddCharset ISO-2022-JP .iso2022-jp .jis
  180. AddCharset ISO-2022-KR .iso2022-kr .kis
  181. AddCharset ISO-2022-CN .iso2022-cn .cis
  182. AddCharset Big5        .Big5       .big5
  183. # For russian, more than one charset is used (depends on client, mostly):
  184. AddCharset WINDOWS-1251 .cp-1251   .win-1251
  185. AddCharset CP866       .cp866
  186. AddCharset KOI8-r      .koi8-r .koi8-ru
  187. AddCharset KOI8-ru     .koi8-uk .ua
  188. AddCharset ISO-10646-UCS-2 .ucs2
  189. AddCharset ISO-10646-UCS-4 .ucs4
  190. AddCharset UTF-8       .utf8
  191. AddCharset GB2312      .gb2312 .gb  
  192. AddCharset utf-7       .utf7
  193. AddCharset utf-8       .utf8
  194. AddCharset big5        .big5 .b5
  195. AddCharset EUC-TW      .euc-tw  
  196. AddCharset EUC-JP      .euc-jp
  197. AddCharset EUC-KR      .euc-kr
  198. AddCharset shift_jis   .sjis
  199. #AddType application/x-httpd-php .php
  200. #AddType application/x-httpd-php-source .phps
  201. AddType application/x-tar .tgz
  202. # To use CGI scripts outside /cgi-bin/:
  203. #
  204. #LoadModule cgi_module /usr/lib/apache2/modules/mod_cgi.so
  205. AddHandler cgi-script .cgi
  206. #Options ExecCGI
  207. # To use server-parsed HTML files
  208. #
  209. <FilesMatch "\.shtml(\..+)?$">
  210.     SetOutputFilter INCLUDES
  211. </FilesMatch>
  212. # If you wish to use server-parsed imagemap files, use
  213. #
  214. #AddHandler imap-file map
  215. BrowserMatch "Mozilla/2" nokeepalive
  216. BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
  217. BrowserMatch "RealPlayer 4\.0" force-response-1.0
  218. BrowserMatch "Java/1\.0" force-response-1.0
  219. BrowserMatch "JDK/1\.0" force-response-1.0
  220. #
  221. # The following directive disables redirects on non-GET requests for
  222. # a directory that does not include the trailing slash.  This fixes a  
  223. # problem with Microsoft WebFolders which does not appropriately handle  
  224. # redirects for folders with DAV methods.
  225. #
  226. BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
  227. BrowserMatch "^WebDrive" redirect-carefully
  228. BrowserMatch "^gnome-vfs" redirect-carefully  
  229. BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully
  230. # Allow server status reports, with the URL of http://servername/server-status
  231. # Change the ".your_domain.com" to match your domain to enable.
  232. #
  233. #<Location /server-status>
  234. #    SetHandler server-status
  235. #    Order deny,allow
  236. #    Deny from all
  237. #    Allow from .your_domain.com
  238. #</Location>
  239. # Allow remote server configuration reports, with the URL of
  240. http://servername/server-info (requires that mod_info.c be loaded).
  241. # Change the ".your_domain.com" to match your domain to enable.
  242. #
  243. #<Location /server-info>
  244. #    SetHandler server-info
  245. #    Order deny,allow
  246. #    Deny from all
  247. #    Allow from .your_domain.com
  248. #</Location>
  249. # Include the virtual host configurations:
  250. Include /etc/apache2/sites-enabled
  251. Include /etc/nagios/apache.conf


---------------
logiciels libres à Pau http://www.paulla.asso.fr
Reply

Marsh Posté le 15-04-2004 à 10:51:45   

Reply

Marsh Posté le 15-04-2004 à 10:55:31    

Il faut bien faire attention à avoir démarrer le démon nagios. Sinon t'utilises quoi comme distribution please ?

Reply

Marsh Posté le 15-04-2004 à 10:56:51    

le demon nagios est bien lancer, puisque j'arrive sur la page
 
je suis sous debain sid


---------------
logiciels libres à Pau http://www.paulla.asso.fr
Reply

Marsh Posté le 15-04-2004 à 12:06:33    

Tu utilises quoi comme navigateur ? T'as essayé d'en changer ?
Ton problème serait peut être que ton navigateur considére que le cgi n'est pas un fichier HTML tout simplement ...

Reply

Marsh Posté le 15-04-2004 à 12:20:04    

j utilise firefox et j ai essayer aussi sous konqueror  
j ai le meme probleme ds les deux cas


---------------
logiciels libres à Pau http://www.paulla.asso.fr
Reply

Marsh Posté le 15-04-2004 à 17:26:33    

up


---------------
logiciels libres à Pau http://www.paulla.asso.fr
Reply

Marsh Posté le 16-04-2004 à 16:59:48    

Je vois pas bien d'où peut venir ton souci ...
Tu utilises quel version de nagios ?

Reply

Marsh Posté le 19-04-2004 à 10:16:43    

Nagios 1.2


---------------
logiciels libres à Pau http://www.paulla.asso.fr
Reply

Marsh Posté le 14-09-2004 à 11:47:51    

up car j'ai le meme probleme avec mozilla  
:jap:

Reply

Marsh Posté le 14-09-2004 à 12:16:54    

J'ai déjà eu se problème et ça vient de ta conf apache.
vérifie bien ta déclaration des CGI
 
peux-tu poster ton fichier /etc/nagios.apache.conf

Reply

Sujets relatifs:

Leave a Replay

Make sure you enter the(*)required information where indicate.HTML code is not allowed