Performance http2 and sprites


I wanted faster page loades for The site uses lots off small images (request) so should be improved.


By creating sprites of all small images and using Nginx to do parallel request performance(google ranking) should increase. To be able to process parallel request I use docker with nginx and project containers behind the nginx container.

How: First lets create a docker-compose file to configure the containers we need:

Now we to set some config for the nginx container, create a directory named Nginx and create a new file: Dockerfile
FROM nginx

COPY nginx.conf /etc/nginx/nginx.conf
RUN mkdir /etc/nginx/logs
ADD index.html /www/data/


Create a config file for your domain, this file gets copied to the nginx container Nginx conf example

http {
  # nginx logging
  access_log /dev/stdout;
  error_log /dev/stdout;
	error_log /etc/nginx/logs/nginx-error.log;
  sendfile on;

    server {
      listen        80;

      location /.well-known/acme-challenge/ {
        root /var/www/certbot;

      location / {
        return 301 https://$host$request_uri;

why-guy add:

Last Tweets: