Welcome! Log In Create A New Profile

Advanced

Re: nginx does't serve compressed static .html files. is it a bug?

peter petrov
February 06, 2015 04:24PM
-------- Оригинално писмо --------

От: Francis Daly francis@daoine.org

Относно: Re: nginx does't serve compressed static .html files. is it a bug?

До: nginx@nginx.org

Изпратено на: 05.02.2015 23:14


On Thu, Feb 05, 2015 at 10:28:33PM +0200, peter petrov wrote:



Hi there,



> Francis Daly I did what you suggested but it doesn't work. Access.log says both times with --compressed or without it "200 162" for the nginx welcome screen.It is very weird.



It works for me:



# ls -l html/index.html*

-rw-r--r-- 1 root root 612 Jul 23 2013 html/index.html

-rw-r--r-- 1 root root 392 Feb 5 21:06 html/index.html.gz



# cat conf/nginx.conf

events {}

http {

gzip_static on;

server {

listen 8080;

}

}



# curl -i http://localhost:8080/

[http 200, I see the content]



# curl -i --compressed http://localhost:8080/

[http 200, I see the content]



# tail -n 2 logs/access.log

127.0.0.1 - - [05/Feb/2015:21:08:51 +0000] "GET / HTTP/1.1" 200 612 "-" "curl/7.15.5 (i386-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"

127.0.0.1 - - [05/Feb/2015:21:08:57 +0000] "GET / HTTP/1.1" 200 392 "-" "curl/7.15.5 (i386-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5"





Repeat the test with exactly this configuration to see if it fails for you.



Or show exactly what you are doing so someone can see if it work for them.



Good luck with it,





Francis Daly francis@daoine.org


Hi ,


Thank you for your efforts and patience. Things are getting better here and I almost achieve your result
Nginx
serves static files now., but writes smth above "Welcome to nginx!"
index.html 00006440000... some numbers and finishes with Oustar
rootroot.
1. sudo tar czvf index.html.gz index.html
2.sudo curl -i --compressed
http://localhost:8080/


or sudo curl -i http://localhost:8080/


they both produce the same result index.html000064400000.....
3. sudo tail -n 2 logs/access.log makes the same result "200 483"
480B was the best I could achieve
using both tar and gzip -9 how did manage to get 392B out of 612B?




_______________________________________________

nginx mailing list

nginx@nginx.org

http://mailman.nginx.org/mailman/listinfo/nginx

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

nginx dows't serve compressed static .html files. is it a bug?

peter petrov February 04, 2015 04:38PM

Re: nginx dows't serve compressed static .html files. is it a bug?

Francis Daly February 04, 2015 05:54PM

Re: nginx does't serve compressed static .html files. is it a bug?

peter petrov February 05, 2015 03:30PM

Re: nginx does't serve compressed static .html files. is it a bug?

Francis Daly February 05, 2015 04:16PM

Re: nginx does't serve compressed static .html files. is it a bug?

peter petrov February 06, 2015 04:24PM

Re: nginx does't serve compressed static .html files. is it a bug?

Francis Daly February 06, 2015 05:54PM

Re: nginx does't serve compressed static .html files. is it a bug?

peter petrov February 07, 2015 02:58PM

Re: nginx does't serve compressed static .html files. is it a bug?

itpp2012 February 07, 2015 03:23PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 297
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready