Situação estranha

1. Situação estranha

Bruno Oliveira Notario
oliveira131

(usa Ubuntu)

Enviado em 20/02/2012 - 14:21h

Olá pessoal,

Pelo titulo do post já devem suspeitar que não se trata de algo normal no mundo Apache. Vou tentar passar o que esta ocorrendo comigo da melhor forma possível, mas confesso que nunca vi nada igual.
Para facilitar o entendimento, passar os passos das últimas alterações no servidor

1º Atualizei, através do Webmin, os seguintes módulos:
Now updating apache2 ..
Installing package(s) with command apt-get -y install apache2 ..
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
apache2-mpm-itk apache2-threaded-dev apache2.2-bin apache2.2-common
libapache2-mod-php5filter
Suggested packages:
apache2-doc apache2-suexec apache2-suexec-custom
The following packages will be REMOVED:
apache2-mpm-prefork libapache2-mod-php5
The following NEW packages will be installed:
apache2-mpm-itk libapache2-mod-php5filter
The following packages will be upgraded:
apache2 apache2-threaded-dev apache2.2-bin apache2.2-common
4 upgraded, 2 newly installed, 2 to remove and 4 not upgraded.
Need to get 6283kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main apache2-threaded-dev amd64 2.2.16-1ubuntu3.5 [139kB]
Get:2 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main apache2 amd64 2.2.16-1ubuntu3.5 [1478B]
Get:3 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main apache2.2-bin amd64 2.2.16-1ubuntu3.5 [2723kB]
Get:4 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main apache2.2-common amd64 2.2.16-1ubuntu3.5 [311kB]
Get:5 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/universe apache2-mpm-itk amd64 2.2.16-1ubuntu3.5 [2386B]
Get:6 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/universe libapache2-mod-php5filter amd64 5.3.3-1ubuntu9.10 [3107kB]
Fetched 6283kB in 3s (2009kB/s)
(Reading database ... 97111 files and directories currently installed.)
Preparing to replace apache2-threaded-dev 2.2.16-1ubuntu3.4 (using .../apache2-threaded-dev_2.2.16-1ubuntu3.5_amd64.deb) ...
Unpacking replacement apache2-threaded-dev ...
Preparing to replace apache2 2.2.16-1ubuntu3.4 (using .../apache2_2.2.16-1ubuntu3.5_amd64.deb) ...
Unpacking replacement apache2 ...
Preparing to replace apache2.2-bin 2.2.16-1ubuntu3.4 (using .../apache2.2-bin_2.2.16-1ubuntu3.5_amd64.deb) ...
Unpacking replacement apache2.2-bin ...
Preparing to replace apache2.2-common 2.2.16-1ubuntu3.4 (using .../apache2.2-common_2.2.16-1ubuntu3.5_amd64.deb) ...
Unpacking replacement apache2.2-common ...
Processing triggers for man-db ...
Processing triggers for ufw ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
dpkg: apache2-mpm-prefork: dependency problems, but removing anyway as you requested:
libapache2-mod-php5 depends on apache2-mpm-prefork (>> 2.0.52) | apache2-mpm-itk; however:
Package apache2-mpm-prefork is to be removed.
Package apache2-mpm-itk is not installed.
(Reading database ... 97109 files and directories currently installed.)
Removing apache2-mpm-prefork ...
* Stopping web server apache2
[Sun Feb 19 17:50:16 2012] [warn] The Alias directive in /etc/zpanel/conf/httpd.conf at line 6 will probably never match because it overlaps an earlier Alias.
[Sun Feb 19 17:50:16 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Sun Feb 19 17:50:16 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting ...done.
Selecting previously deselected package apache2-mpm-itk.
(Reading database ... 97106 files and directories currently installed.)
Unpacking apache2-mpm-itk (from .../apache2-mpm-itk_2.2.16-1ubuntu3.5_amd64.deb) ...
Setting up apache2.2-bin (2.2.16-1ubuntu3.5) ...
Setting up apache2.2-common (2.2.16-1ubuntu3.5) ...
Setting up apache2-mpm-itk (2.2.16-1ubuntu3.5) ...
* Starting web server apache2
[Sun Feb 19 17:50:32 2012] [warn] The Alias directive in /etc/zpanel/conf/httpd.conf at line 6 will probably never match because it overlaps an earlier Alias.
[Sun Feb 19 17:50:32 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Sun Feb 19 17:50:32 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
...done.
dpkg: libapache2-mod-php5: dependency problems, but removing anyway as you requested:
php5 depends on libapache2-mod-php5 (>= 5.3.3-1ubuntu9.10) | libapache2-mod-php5filter (>= 5.3.3-1ubuntu9.10) | php5-cgi (>= 5.3.3-1ubuntu9.10) | php5-fpm (>= 5.3.3-1ubuntu9.10); however:
Package libapache2-mod-php5 is to be removed.
Package libapache2-mod-php5filter is not installed.
Package php5-cgi is not installed.
Package php5-fpm is not installed.
(Reading database ... 97109 files and directories currently installed.)
Removing libapache2-mod-php5 ...
Module php5 disabled.
Run '/etc/init.d/apache2 restart' to activate new configuration!
Selecting previously deselected package libapache2-mod-php5filter.
(Reading database ... 97107 files and directories currently installed.)
Unpacking libapache2-mod-php5filter (from .../libapache2-mod-php5filter_5.3.3-1ubuntu9.10_amd64.deb) ...
Setting up libapache2-mod-php5filter (5.3.3-1ubuntu9.10) ...

Creating config file /etc/php5/apache2filter/php.ini with new version
* Reloading web server config apache2
[Sun Feb 19 17:50:38 2012] [warn] The Alias directive in /etc/zpanel/conf/httpd.conf at line 6 will probably never match because it overlaps an earlier Alias.
[Sun Feb 19 17:50:38 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Sun Feb 19 17:50:38 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
...done.
Setting up apache2-threaded-dev (2.2.16-1ubuntu3.5) ...
Setting up apache2 (2.2.16-1ubuntu3.5) ...
.. install complete.

Now updating apache2-mpm-prefork ..
Installing package(s) with command apt-get -y install apache2-mpm-prefork ..
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be REMOVED:
apache2-mpm-itk
The following NEW packages will be installed:
apache2-mpm-prefork
0 upgraded, 1 newly installed, 1 to remove and 4 not upgraded.
Need to get 2386B of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main apache2-mpm-prefork amd64 2.2.16-1ubuntu3.5 [2386B]
Fetched 2386B in 0s (8006B/s)
dpkg: apache2-mpm-itk: dependency problems, but removing anyway as you requested:
libapache2-mod-php5filter depends on apache2-mpm-prefork (>> 2.0.52) | apache2-mpm-itk; however:
Package apache2-mpm-prefork is not installed.
Package apache2-mpm-itk is to be removed.
apache2 depends on apache2-mpm-worker (= 2.2.16-1ubuntu3.5) | apache2-mpm-prefork (= 2.2.16-1ubuntu3.5) | apache2-mpm-event (= 2.2.16-1ubuntu3.5) | apache2-mpm-itk (= 2.2.16-1ubuntu3.5); however:
Package apache2-mpm-worker is not installed.
Package apache2-mpm-prefork is not installed.
Package apache2-mpm-event is not installed.
Package apache2-mpm-itk is to be removed.
(Reading database ... 97112 files and directories currently installed.)
Removing apache2-mpm-itk ...
* Stopping web server apache2
[Sun Feb 19 17:51:04 2012] [warn] The Alias directive in /etc/zpanel/conf/httpd.conf at line 6 will probably never match because it overlaps an earlier Alias.
[Sun Feb 19 17:51:04 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Sun Feb 19 17:51:04 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
... waiting ...done.
Selecting previously deselected package apache2-mpm-prefork.
(Reading database ... 97109 files and directories currently installed.)
Unpacking apache2-mpm-prefork (from .../apache2-mpm-prefork_2.2.16-1ubuntu3.5_amd64.deb) ...
Setting up apache2-mpm-prefork (2.2.16-1ubuntu3.5) ...
* Starting web server apache2
[Sun Feb 19 17:51:09 2012] [warn] The Alias directive in /etc/zpanel/conf/httpd.conf at line 6 will probably never match because it overlaps an earlier Alias.
[Sun Feb 19 17:51:09 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
[Sun Feb 19 17:51:09 2012] [warn] NameVirtualHost *:80 has no VirtualHosts
...done.
.. install complete.

Now updating apache2-utils ..
Installing package(s) with command apt-get -y install apache2-utils ..
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
apache2-utils
1 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
Need to get 167kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main apache2-utils amd64 2.2.16-1ubuntu3.5 [167kB]
Fetched 167kB in 1s (141kB/s)
(Reading database ... 97114 files and directories currently installed.)
Preparing to replace apache2-utils 2.2.16-1ubuntu3.4 (using .../apache2-utils_2.2.16-1ubuntu3.5_amd64.deb) ...
Unpacking replacement apache2-utils ...
Processing triggers for man-db ...
Setting up apache2-utils (2.2.16-1ubuntu3.5) ...
.. install complete.

Now updating libpng12-0 ..
Installing package(s) with command apt-get -y install libpng12-0 ..
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
libpng12-0
1 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Need to get 181kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main libpng12-0 amd64 1.2.44-1ubuntu0.2 [181kB]
Fetched 181kB in 1s (153kB/s)
(Reading database ... 97114 files and directories currently installed.)
Preparing to replace libpng12-0 1.2.44-1ubuntu0.1 (using .../libpng12-0_1.2.44-1ubuntu0.2_amd64.deb) ...
Unpacking replacement libpng12-0 ...
Setting up libpng12-0 (1.2.44-1ubuntu0.2) ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
.. install complete.

Now updating update-manager-core ..
Installing package(s) with command apt-get -y install update-manager-core ..
Reading package lists...
Building dependency tree...
Reading state information...
The following packages will be upgraded:
update-manager-core
1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 198kB of archives.
After this operation, 0B of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu/ maverick-updates/main update-manager-core amd64 1:0.142.23.2 [198kB]
Fetched 198kB in 1s (149kB/s)
(Reading database ... 97114 files and directories currently installed.)
Preparing to replace update-manager-core 1:0.142.23.1 (using .../update-manager-core_1%3a0.142.23.2_amd64.deb) ...
Unpacking replacement update-manager-core ...
Setting up update-manager-core (1:0.142.23.2) ...
Processing triggers for python-central ...
.. install complete.

Successfully installed 10 packages

2º Depois começaram a aparecer caracteres estranhos no final de qualquer página que se encontra no endereço físico /etc/zpanel, por exemplo:
..</html>
&#9674;&#9612;&#9633;&#9633;&#9633;

Agora vamos aos fatos:
No mesmo servidor rodam outros virtual hosts, mas somente os que tem apontamento físico para /etc/zpanel tem esse acréscimo no final do HTML (nem sempre são os mesmos, variam de navegador para navegador), os demais que se encontram em /var/zpanel/hostdata funcionam normalmente.
Se eu copio o conteúdo de algum item da pasta /etc/zpanel e insiro em /var/zpanel/hostdata e mudo no httpd.conf do Apache o DocumentRoot (apenas altero isso, nao altero as demais opções), funciona normalmente gerando o HTML sem esses símbolos no final do HTML.
Todos os arquivos php/html tem a instrução header de charset correta e a opção de default charset do Apache está desabilitada (sempre foi assim).

Eu já alterei http.conf, php.ini mas nada adiantou.

Como exemplo segue os links:
http://zpanel.exactiweb.com/apps/webmail/ - Pasta física /etc/zpanel/apps/webmail
http://exacti.com.br - Pasta física /var/zpanel/hostdata/exacti

Obs.: Isso ocorre independente do charset ser iso-8859-1 ou UTF-8. Para verificar melhor o ocorrido sugiro que visualize o código fonte no seu web browser).

Bom galera é isso, quem puder ajudar fico grato.


Att,
Bruno




  


2. Resolvido

Bruno Oliveira Notario
oliveira131

(usa Ubuntu)

Enviado em 24/02/2012 - 16:14h

Consegui solucionar o mistério. O problema era no mod deflate. Nessa atualização ele criou a linha AddOutputFilterByType DEFLATE application/x-httpd-php no seu arquivo de configuração (/etc/apache2/mods-available/deflate.conf).

Quando a removi, tudo voltou ao normal e o apache voltou até a ser rápido em seu tempo de resposta.

Não entendi o do porque da criação dessa linha na atualização, visto que parece se tratar de compressão de arquivos php, mas pelo que eu saiba, o php gera a saída texto/html e isso depois é passado ao Apache que, dali, o deflate entra em ação e executa a compressão, enviando assim os dados para o usuário.

Fica ai a dica.

Mas agora vem outro mistério: para que raios a linha AddOutputFilterByType DEFLATE application/x-httpd-php???






Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts