Discussion:
[Monitorix-general] Apache-Problem
Thomas Trepper
2014-05-28 06:58:44 UTC
Permalink
Hi all,

I am using monitorix 3.5.1 and Apache 2 and I would like to use Apache to serve the content. I have created the following vHost:

<VirtualHost………

Alias /monitorix /var/lib/monitorix/www
ScriptAlias /monitorix-cgi /var/lib/monitorix/www/cgi
<Directory /var/lib/monitorix/www/cgi/>
DirectoryIndex monitorix.cgi
Options ExecCGI
order deny,allow
#deny from all
allow from all
<IfModule mod_authz_core.c>
# Apache 2.4
Require all denied
Require host 127.0.0.1
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Deny from all
Allow from 127.0.01
</IfModule>
</Directory>
<Directory /var/lib/monitorix/www>
#Options +Indexes
Options Indexes Includes FollowSymLinks
</Directory>


……../VirtualHost>

and when I try to access I get the following error:


[notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u9 mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
[Wed May 28 08:55:50 2014] [error] [client 192.168.19.223] malformed header from script. Bad header=<!DOCTYPE HTML PUBLIC '-//W3C/: monitorix.cgi, referer: https://192.168.19.85/monitorix/


Does maybe somebody has an idea what I am doing wrong or can maybe point me to the right direction?

Thanks a lot in advance.

Thomas
Jordi Sanfeliu
2014-05-28 07:31:07 UTC
Permalink
Thomas,

Have you disabled the Monitorix built-in HTTP server in the
'/etc/monitorix/monitorix.conf' file?

<httpd_builtin>
enabled = n

Regards.
Post by Thomas Trepper
Hi all,
I am using monitorix 3.5.1 and Apache 2 and I would like to use Apache
<VirtualHost………
Alias /monitorix /var/lib/monitorix/www
ScriptAlias /monitorix-cgi /var/lib/monitorix/www/cgi
<Directory /var/lib/monitorix/www/cgi/>
DirectoryIndex monitorix.cgi
Options ExecCGI
order deny,allow
#deny from all
allow from all
<IfModule mod_authz_core.c>
# Apache 2.4
Require all denied
Require host 127.0.0.1
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Deny from all
Allow from 127.0.01
</IfModule>
</Directory>
<Directory /var/lib/monitorix/www>
#Options +Indexes
Options Indexes Includes FollowSymLinks
</Directory>
……../VirtualHost>
[notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u9 mod_ssl/2.2.22
OpenSSL/1.0.1e configured -- resuming normal operations
[Wed May 28 08:55:50 2014] [error] [client 192.168.19.223] malformed
monitorix.cgi, referer: https://192.168.19.85/monitorix/
Does maybe somebody has an idea what I am doing wrong or can maybe point
me to the right direction?
Thanks a lot in advance.
Thomas
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
Thomas Trepper
2014-05-28 07:32:45 UTC
Permalink
No, I only changed the port to a higher one and it’s listening to *.

Thanks,
Thomas
Post by Jordi Sanfeliu
Thomas,
Have you disabled the Monitorix built-in HTTP server in the
'/etc/monitorix/monitorix.conf' file?
<httpd_builtin>
enabled = n
Regards.
Post by Thomas Trepper
Hi all,
I am using monitorix 3.5.1 and Apache 2 and I would like to use Apache
<VirtualHost………
Alias /monitorix /var/lib/monitorix/www
ScriptAlias /monitorix-cgi /var/lib/monitorix/www/cgi
<Directory /var/lib/monitorix/www/cgi/>
DirectoryIndex monitorix.cgi
Options ExecCGI
order deny,allow
#deny from all
allow from all
<IfModule mod_authz_core.c>
# Apache 2.4
Require all denied
Require host 127.0.0.1
</IfModule>
<IfModule !mod_authz_core.c>
# Apache 2.2
Order deny,allow
Deny from all
Allow from 127.0.01
</IfModule>
</Directory>
<Directory /var/lib/monitorix/www>
#Options +Indexes
Options Indexes Includes FollowSymLinks
</Directory>
……../VirtualHost>
[notice] Apache/2.2.22 (Debian) PHP/5.4.4-14+deb7u9 mod_ssl/2.2.22
OpenSSL/1.0.1e configured -- resuming normal operations
[Wed May 28 08:55:50 2014] [error] [client 192.168.19.223] malformed
monitorix.cgi, referer: https://192.168.19.85/monitorix/
Does maybe somebody has an idea what I am doing wrong or can maybe point
me to the right direction?
Thanks a lot in advance.
Thomas
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Monitorix-general mailing list
https://lists.sourceforge.net/lists/listinfo/monitorix-general
Jordi Sanfeliu
2014-05-28 07:37:03 UTC
Permalink
Thomas,

If you keep the built-in HTTP server enabled while at the same time you
want to use an external web server, definitely it won't work.

What I wanted to say in my previous email, is that you _must_ disable
the built-in HTTP server if you are using an external web server.

Regards.
Post by Thomas Trepper
No, I only changed the port to a higher one and it’s listening to *.
Thanks,
Thomas
Post by Jordi Sanfeliu
Thomas,
Have you disabled the Monitorix built-in HTTP server in the
'/etc/monitorix/monitorix.conf' file?
<httpd_builtin>
enabled = n
Regards.
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
Thomas Trepper
2014-05-28 07:40:54 UTC
Permalink
Hi Jordi,

thanks a lot - ths helped. But I haven’t understood it. Why do I have to disable the internal one?

Thomas
Post by Jordi Sanfeliu
Thomas,
If you keep the built-in HTTP server enabled while at the same time you
want to use an external web server, definitely it won't work.
What I wanted to say in my previous email, is that you _must_ disable
the built-in HTTP server if you are using an external web server.
Regards.
Post by Thomas Trepper
No, I only changed the port to a higher one and it’s listening to *.
Thanks,
Thomas
Post by Jordi Sanfeliu
Thomas,
Have you disabled the Monitorix built-in HTTP server in the
'/etc/monitorix/monitorix.conf' file?
<httpd_builtin>
enabled = n
Regards.
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Monitorix-general mailing list
https://lists.sourceforge.net/lists/listinfo/monitorix-general
Jordi Sanfeliu
2014-05-28 07:57:31 UTC
Permalink
Hi Thomas,

Currently is the built-in HTTP server who sends the first HTML header
("Content-Type: text/html\n\n"), so 'monitorix.cgi' relies on this.
That's the reason why you get a 'malformed header' message. If you
disable the built-in HTTP server, that header will be sent by
'monitorix.cgi'.

I guess it could be possible that 'monitorix.cgi' be the only one who
can send such header in any case. I'd need to make some tests on this.

Regards.
Post by Thomas Trepper
Hi Jordi,
thanks a lot - ths helped. But I haven’t understood it. Why do I have to disable the internal one?
Thomas
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
Thomas Trepper
2014-05-28 07:59:19 UTC
Permalink
Thanks a lot Jordi :)
Thomas
Post by Jordi Sanfeliu
Hi Thomas,
Currently is the built-in HTTP server who sends the first HTML header
("Content-Type: text/html\n\n"), so 'monitorix.cgi' relies on this.
That's the reason why you get a 'malformed header' message. If you
disable the built-in HTTP server, that header will be sent by
'monitorix.cgi'.
I guess it could be possible that 'monitorix.cgi' be the only one who
can send such header in any case. I'd need to make some tests on this.
Regards.
Post by Thomas Trepper
Hi Jordi,
thanks a lot - ths helped. But I haven’t understood it. Why do I have to disable the internal one?
Thomas
--
Jordi Sanfeliu
FIBRANET Network Services Provider
http://www.fibranet.cat
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet
_______________________________________________
Monitorix-general mailing list
https://lists.sourceforge.net/lists/listinfo/monitorix-general
Loading...