NGINX server config

robiso edited this page Aug 23, 2017 · 8 revisions

Paste the below code into your NGINX server config file - nginx.conf

location ~ database.js {
	return 403;
}

autoindex off;

location / {
	if (!-e $request_filename) {
		rewrite ^/(.+)$ /index.php?page=$1 last;
	}
}

The code above replicates Apache's htaccess functionality with the power of your NGINX server config. Since NGINX doesn't have the "traditional" htaccess file, this is necessary to make WonderCMS work properly.


NOTE: The code above is required to deny access to database.js and make clean URL's which are SEO friendly.


Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.