Skip to content

henchman21/ipquail

Repository files navigation

IP Quail

Like ipchicken but shorter

I wanted to make my own ipchicken type site, so I came up with this.

Uses:

Setup with NGINX

map $http_user_agent $myindex {
	default /index.html;
	~curl /ip.html;
}

server {
	listen 199.202.21.19:80; 
	listen [2604:4280:d000:11::19]:80;

	server_name ipquail.com 4.ipquail.com 6.ipquail.com www.ipquail.com;
	root /var/www/ipquail;

	charset utf-8;

	access_log /var/log/nginx/ipquail_com_access.log;
	error_log /var/log/nginx/ipquail_com_error.log;

	ssi on;

	location = / { rewrite ^ $myindex; }

	location /ip/api/v1.0/ {
		ssi_types *;
		try_files $uri $uri/ $uri.html =404;
		add_header 'Access-Control-Allow-Origin' '*';
		add_header 'Access-Control-Allow-Methods' 'GET';
		add_header 'Access-Control-Allow-Headers' 'X-Requested-With,Accept,Content-Type,Origin';
		types { } 
			default_type  application/json;
	}

    pagespeed on;
    pagespeed FileCachePath /var/ngx_pagespeed_cache;
    pagespeed RewriteLevel CoreFilters;
    pagespeed EnableFilters collapse_whitespace,remove_comments;
    location ~ ".pagespeed.([a-z].)?[a-z]{2}.[^.]{10}.[^.]+" { }
    location ~ "^/ngx_pagespeed_static/" { }
    location ~ "^/ngx_pagespeed_beacon$" { }

}

About

Like ipfowl, but uses SSI instead of PHP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published