On Wednesday 09 of March 2011 12:56:34 Nikolay Shopik wrote:
Also it is possible to make Observium run from sub-directory instead of virtual-host, like that http://example.com/observium? I did tried some rewrite rules on apache w/o luck.
I think the changes in attached patch worked for me. I haven't submitted it yet, because it is just a quick hack to let me test the software.
Best regards Matej Vadnjal
Index: css/styles.css =================================================================== --- html/css/styles.css (revision 1771) +++ html/css/styles.css (working copy) @@ -1,5 +1,5 @@ .submit { - background-image:url('/images/submitbg.png'); + background-image:url('../images/submitbg.png'); background-position:0 100%; border-color:#B2B2B2 #525252 #525252 #B2B2B2; } @@ -8,7 +8,7 @@ }
input,select { - background:#FFFFFF url('/images/textbg.png') repeat-x scroll 0 0; + background:#FFFFFF url('../images/textbg.png') repeat-x scroll 0 0; font-size:1em; border:1px solid #B2B2B2 bbackground-color:cornsilk; Index: includes/hostbox.inc =================================================================== --- html/includes/hostbox.inc (revision 1771) +++ html/includes/hostbox.inc (working copy) @@ -17,8 +17,8 @@ $port_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `ports` WHERE `device_id` = '".$device['device_id']."'"),0); $sensor_count = mysql_result(mysql_query("SELECT COUNT(*) FROM `sensors` WHERE `device_id` = '".$device['device_id']."'"),0);
- echo(' <tr background="'.$bg_image.'" bgcolor="' . $bg . '" onmouseover="this.style.backgroundColor='#fdd';" onmouseout="this.style.backgroundColor='' . $bg . '';" - onclick="location.href='/device/'.$device['device_id'].'/'" style="cursor: hand;"> + echo(' <tr background="'.$bg_image.'" bgcolor="' . $bg . '" onmouseover="this.style.backgroundColor=''.$list_highlight.'';" onmouseout="this.style.backgroundColor='' . $bg . '';" + onclick="location.href=''.$config['base_url'].'/device/'.$device['device_id'].'/'" style="cursor: hand;"> <td width="40" align="center" valign="middle">' . $image . '</td> <td width="300"><span style="font-weight: bold; font-size: 14px;">' . generate_device_link($device) . '</span> <br />' . $device['sysName'] . '</td> Index: .htaccess =================================================================== --- html/.htaccess (revision 1771) +++ html/.htaccess (working copy) @@ -1,6 +1,6 @@ Options FollowSymlinks Multiviews
-RewriteBase / +RewriteBase /observium/ RewriteEngine on RewriteCond %{REQUEST_URI} !^(.*).php$ RewriteCond %{REQUEST_URI} !^(.*).css$