Talk:Installation using Nginx

From Habari Project

Jump to: navigation, search

The example config should be updated to use try_files instead of the two conditionals, that's what it's for.

The expires block could be moved into a separate location declaration, though covering all static files that exist does have some merit.

The running config on habariproject.org:

	# disable logging for popular static files
	location = /favicon.ico {
		log_not_found off;
		access_log off;
	}

	location = /robots.txt {
		log_not_found off;
		access_log off;
	}

	location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
		expires max;
		log_not_found off;
	}

	location /en/ {

		# force ssl for login and admin pages
		rewrite ^/en/(admin|auth)(.*) https://$host$request_uri;

		try_files $uri $uri/ /en/index.php?$args;

		if ( -f $request_filename ) {
			expires 30d;
			break;
		}

	}
Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Cannot contact the database server: Access denied for user 'habari'@'localhost' to database 'habari_wiki' (localhost))


You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.