Skip to content
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.

[dev.icinga.com #2586] Web path / not working #773

Closed
icinga-migration opened this issue May 7, 2012 · 16 comments
Closed

[dev.icinga.com #2586] Web path / not working #773

icinga-migration opened this issue May 7, 2012 · 16 comments

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/2586

Created by omula on 2012-05-07 07:55:07 +00:00

Assignee: (none)
Status: Rejected (closed on 2015-04-26 07:42:40 +00:00)
Target Version: (none)
Last Update: 2015-04-26 07:42:40 +00:00 (in Redmine)

Icinga Version: 1.6.1
Icinga Web Version: 1.6.1
IDO Version: 1.6.1
OS Version: Debian 6
DB Type: MySQL
DB Version: 5.1
Browser Version: any

Setting the configure option --with-web-path to / makes icinga-web not to work.

In this case if appkit.web_path is equal to / or left empty icinga-web fails to work.


Relations:

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2012-05-09 07:59:33 +00:00

  • Category set to Installation
  • Assigned to set to jmosshammer

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2012-05-09 07:59:39 +00:00

  • Status changed from New to Assigned

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2012-05-09 09:06:33 +00:00

Fails to work can mean a lot:
Does your webserver prohibit access, do you get an error message, etc?

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2012-05-09 09:06:39 +00:00

  • Status changed from Assigned to Feedback

@icinga-migration
Copy link
Author

Updated by omula on 2012-05-11 07:47:57 +00:00

Command used to configure:
./configure --with-web-path=/ --prefix=/var/www/virtuals/iw --with-icinga-bin=/usr/sbin/icinga --with-icinga-cfg=/etc/icinga/ --with-icinga-objects-dir=/etc/icinga/objects/

Apache virtual host configuration:

        ServerAdmin     webmaster@icinga
        ServerName      iw.example.com
        ServerAlias     www.iw.example.com *.iw.example.com *.iw.example.com.* mon.example.com *.mon.example.com *.mon.example.com.*

        DocumentRoot /var/www/virtuals/iw/pub/

        AliasMatch /modules/([A-Za-z0-9]*)/resources/styles/([A-Za-z0-9]*\.css)$ /var/www/virtuals/iw/app/modules/$1/pub/styles/$2
        AliasMatch /modules/([A-Za-z0-9]*)/resources/images/([A-Za-z_\-0-9]*\.(png|gif|jpg))$ /var/www/virtuals/iw/app/modules/$1/pub/images/$2

        RewriteLog "/var/tmp/rewrite.log"
        RewriteLogLevel 9
        Alias /js/ext3 /var/www/virtuals/iw/lib/ext3
        #Alias / /usr/local/icinga-web/pub

        
                Order allow,deny
                Allow from all
        

        
                Order allow,deny
                Allow from all
        


        
                Order allow,deny
                Allow from all
        


        LogLevel debug

        ErrorLog ${APACHE_LOG_DIR}/icinga-error.log

        CustomLog ${APACHE_LOG_DIR}/icinga-access.log combined

Errors:
Request failed
A error occured when requesting //modules/appkit/ext/applicationState
Request failed
A error occured when requesting //modules/appkit/servertime
Request failed
A error occured when requesting undefined
Request failed
A error occured when requesting undefined

I have also installed firebug and it shows it is trying to access to some urls which miss the iw.example.com.
Examples:
http://js/ext3/resources/css/ext-all-notheme.css
http://styles/icinga.site.css
http://modules/appkit/ext/applicationState

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2012-05-11 12:31:11 +00:00

  • Target Version set to 1.8

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2012-09-26 16:40:51 +00:00

  • Target Version deleted 1.8
  • Icinga Version set to 1
  • Icinga Web Version set to 1
  • IDO Version set to 1
  • OS Version set to Debian 6
  • DB Type set to MySQL
  • DB Version set to 5
  • Browser Version set to any

this is still a problem, but since i am not an apache expert, i would guess, we would rely on community help here?

@icinga-migration
Copy link
Author

Updated by jmosshammer on 2012-10-09 10:58:56 +00:00

  • Status changed from Feedback to New
  • Assigned to deleted jmosshammer

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-02-21 20:03:52 +00:00

i guess the rewritebase in .htaccess could be an issue. since this will be changed with #3500 one should possibly wait for that fix and then test again.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2013-05-29 12:33:07 +00:00

  • Status changed from New to Feedback

can you test that with 1.9 and the new apache configuration without any .htaccess files?

@icinga-migration
Copy link
Author

Updated by tcheuck on 2013-05-30 23:02:58 +00:00

Still not working for me, with latest Nginx release (1.4.1). Seems to be more like an Agavi bug ?

My poor patch to bypass this bug:

  • In icinga.xml (/etc/icinga-web/conf.d/icinga.xml on Debian), set "appkit.web_path" to the absolute URL of your Icinga-web setup, without trailing slash. Ex:

    https://monitoring.mydomain.tld

  • Apply the following patch to AppKitUtil.js file (Debian: /usr/share/icinga-web/app/modules/AppKit/lib/js/AppKitUtil.js) :
--- AppKitUtil.js.origin    2013-03-27 00:16:36.134536014 +0100
+++ AppKitUtil.js   2013-03-27 00:21:53.190639769 +0100
@@ -227,7 +227,8 @@
         },

         getBaseUrl: function() {
-            return this.getBase() + this.get('path');
+            //return this.getBase() + this.get('path');
+            return this.getBase();
         } 

     }))());
  • Don't forget to clear icinga-web cache :
/usr/lib/icinga-web/bin/clearcache.sh

Ugly but works ©

@icinga-migration
Copy link
Author

Updated by sgsax on 2013-11-14 18:12:00 +00:00

I can confirm I'm still seeing this in 1.10.0. Installed from source, not packages. Along with the workaround mentioned above, I made the following change to $icinga-web/etc/conf.d/icinga.xml:

/images

Cheers.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-19 14:14:24 +00:00

Maybe this should get a howto on the Icinga wiki. Could you do that?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-03-12 19:43:28 +00:00

  • Status changed from Feedback to New

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-04-26 07:42:40 +00:00

  • Status changed from New to Rejected

No feedback provided.

@vickynamdeo
Copy link

vickynamdeo commented Jan 21, 2017

Hi,
I just install icinga 1.10.0 . My icinga is running but i am not able to see styles and js/ext3.
both are present in directory .while i troubleshoot throuh the devloper tool then files are shoing in styles but after click on that file no output comes .
1- image for the Style
image
2- for the js/ext3
image
3- <Directory /opt/foss/icinga-web/pub>
index.php proply .

image

# this is the icinga-web.conf

Icinga Web Apache configuration

this file includes all RewriteRules required

No .htaccess file is needed under

the application paths.

(c) 2012 Icinga Development Team

Markus Frosch markus@lazyfrosch.de

Matching for module stylesheet and images

AliasMatch /icinga-web/modules/([A-Za-z0-9])/resources/styles/([A-Za-z0-9].css)$ /opt/foss/icinga-web/app/modules/$1/pub/styles/$2
AliasMatch /icinga-web/modules/([A-Za-z0-9])/resources/images/([A-Za-z_-0-9].(png|gif|jpg))$ /opt/foss/icinga-web/app/modules/$1/pub/images/$2

Matching for Icinga Web and the ext3 framework

Alias /icinga-web/js/ext3 /opt/foss/icinga-web/lib/ext3

Alias /icinga-web /opt/foss/icinga-web/pub

#RedirectMatch "^/icinga-web$" /icinga-web/

Access to where the styles are located

<DirectoryMatch /opt/foss/icinga-web/app/modules/\w+/pub/styles/>
Options -Indexes -MultiViews
Require all granted

Access to where the images are located

<DirectoryMatch /opt/foss/icinga-web/app/modules/\w+/pub/images/>
Options -Indexes -MultiViews
Require all granted

Access to the ext3 library

<Directory /opt/foss/icinga-web/lib/ext3>
Options -Indexes -MultiViews
Require all granted

Access to the public web folder of Icinga Web

<Directory /opt/foss/icinga-web/pub>
DirectoryIndex index.php
Options FollowSymLinks
Require all granted
Options -MultiViews -Indexes +FollowSymLinks

RewriteEngine On
# /icinga-web is base for all rewrite rules

RewriteBase /icinga-web

# If the requested URL does not exist (it's likely an agavi route),
# pass it as path info to index.php, the Agavi dispatch script.

RewriteRule ^$ index.php?/ [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php?/$1 [QSA,L]

<IfModule mod_deflate.c>
    # Insert filter
    SetOutputFilter DEFLATE

    # Netscape 4.x has some problems...
    BrowserMatch ^Mozilla/4 gzip-only-text/html

    # Netscape 4.06-4.08 have some more problems
    BrowserMatch ^Mozilla/4\.0[678] no-gzip

    # MSIE masquerades as Netscape, but it is fine
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    # Don't compress images
    SetEnvIfNoCase Request_URI \
    \.(?:gif|jpe?g|png)$ no-gzip dont-vary

    # Make sure proxies don't deliver the wrong content
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
</IfModule>

<IfDefine APACHE2>
    AcceptPathInfo On
</IfDefine>

..

icinga-web.conf included in httpd.conf also .

i m attaching the icnga home page ..
image

image

Please help me out .

Thanks
Kaushalendra Namdeo
+918287131273
vicky.namdeo@gmail.com

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants