Giter Club home page Giter Club logo

lwjgl3-www's Introduction

LWJGL.org - The home of Lightweight Java Game Library 3

The website for LWJGL 3.

Requirements

Dependencies

The website uses the following external libraries/files:

All external files are loaded directly from CDNs and not bundled here.

Custom stylesheets and scripts are inlined to avoid additional HTTP requests.

Non-text content is loaded from LWJGL's CDN.

Build status icons are loaded from travis-ci.org and TeamCity.

The blog is Ghost, the forum is SMF, the old website can be found here, and the old wiki is MediaWiki.

PHP Configuration

Just make sure short_open_tag is set to on in your php.ini

We use the Mobile Detect Library to avoid loading the background video for mobile and tablet devices.

NGINX Configuration

Make sure you have gzip compression enabled.

Below you will find our current server configuration, we do routing on NGINX to keep things simple. Some rewrites ensure we don't break links for the old site.

server {
	listen 80 default_server;
	# listen [::]:80;
	server_name
		lwjgl.com
		www.lwjgl.com
		lwjgl.org;

	return 301 $scheme://www.lwjgl.org$request_uri;
}

server {
	listen 80;
	server_name www.lwjgl.org;
	root /srv/lwjgl.org/site/www;
	index index.php;

	# Errors

	error_page 404 @404;
	error_page 410 @410;
	error_page 502 @502;
	error_page 503 @503;

	location /404.html {
		internal;
	}
	
	location /50x.html {
		internal;
	}
	
	location @404 {
		if ($http_accept !~* "text/html") {
			return 404;
		}
		rewrite ^(.*)$ /404.html break;
	}
	
	location @410 {
		if ($http_accept !~* "text/html") {
			return 410;
		}
		rewrite ^(.*)$ /404.html break;
	}
	
	location @502 {
		if ($http_accept !~* "text/html") {
			return 502;
		}
		rewrite ^(.*)$ /50x.html break;
	}
	
	location @503 {
		if ($http_accept !~* "text/html") {
			return 503;
		}
		rewrite ^(.*)$ /50x.html break;
	}
	
	location ~ \.(js|css|png|jpg|jpeg|gif|svg|ico|swf|mp3|wav|ogg)$ {
		add_header Cache-Control "public, max-age=31536000";
		try_files $uri =404;
	}

	location ~ \.(html|htm|xml)$ {
		charset utf-8;
		add_header Cache-Control "public, max-age=31536000";
		try_files $uri =404;
	}

	# Routing
	
	location = /wiki {
		return 301 http://wiki.lwjgl.org/;
	}
	
	location ^~ /wiki/ {
		rewrite
			^/wiki/(.*)
			http://wiki.lwjgl.org/$1
			permanent;
	}
	
	location = /forum {
		return 301 http://forum.lwjgl.org/;
	}
	
	location ^~ /forum/ {
		rewrite
			^/forum/(.*)
			http://forum.lwjgl.org/$1
			permanent;
	}
	
	location = /guide {
		rewrite ^ /guide.php last;
	}
	
	location = /download {
		rewrite ^ /download.php last;
	}
	
	location = /source {
		rewrite ^ /source.php last;
	}
	location = /license {
		rewrite ^ /license.php last;
	}
	
	location = /teamcity {
		rewrite ^ /teamcity.php last;
	}

	# PHP

	location ~ \.php$ {
		try_files $uri =404;
		fastcgi_split_path_info ^(.+\.php)(/.+)$;
		fastcgi_pass unix:/var/run/php5-fpm.sock;
		#fastcgi_pass 127.0.0.1:9000;
		fastcgi_index index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		include fastcgi_params;
	}

}

lwjgl3-www's People

Contributors

apostolos avatar spasi avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.