VirtualHost returning strange characters?

0

I need to access a virtual host of my machine, and a device Android (consume API )

When I access virtual host with the name I set in my hosts " link " file, I can receive the response from API normally, but when I try to access the IP of my machine (example: link ), I get a response similar to this: / p>

E�_��l!/�Qe���b�����7�?�P�����@Gӗ(=�N��(����O�X��8���&M�8���z
���n֝�V�vq����$�'�^��� Y�z�

My file of hosts :

127.0.0.1   api.xpto
127.0.0.1   client.xpto

My virtual host :

<VirtualHost *:80>
    DocumentRoot "c:/wamp64/www/api/pubic"
    ServerName api.xpto

 ErrorLog "logs/apache_error.log"
 CustomLog "logs/apache_access.log" common

    <Directory "c:/wamp64/www/api/public">
            Order allow,deny
            Allow from all
    </Directory>
</VirtualHost>

Has anyone ever had a similar situation? I'm using Windows 10 with WAMP for apache .

    
asked by anonymous 03.05.2017 / 16:17

1 answer

2

This is looking like compressed response (probably gzip), many browsers support Gzip in response (almost all), but what happens is that in your case it must be compressing twice, or the API domain is sending compressed even when it does not send oo header: Accept-Encoding

In httpd.conf comment the line, like this:

 #LoadModule deflate_module modules/mod_deflate.so

And restart Apache

    
03.05.2017 / 16:57