# Wave Framework <http://www.waveframework.com>
# Nginx Configuration
#
# Nginx commands are stored in this file. This file is never automatically loaded by Nginx and
# commands and configuration from this file should be set to Nginx server configuration. These
# commands redirect all HTTP requests, except those to /static/ folders and those that are PHP
# files itself, to Index Gateway stored in /index.php. These commands and Wave Framework itself
# only work when URL rewriting is supported.
#
# @package Index Gateway
# @author Kristo Vaher <kristo@waher.net>
# @copyright Copyright (c) 2012, Kristo Vaher
# @license GNU Lesser General Public License Version 3
# @tutorial /doc/pages/rewrites.htm
# @since 2.0.0
# @version 3.1.4
server
{
# Make sure to set this as your actual server WWW root
# This directory depends on nginx directory
root /var/www/example.com/html;
# Index file
index index.php;
# This is for making sure that files in /resources/static/ folder don't get parsed with PHP
location ^~ /resources/static/ {
break;
}
# Rewrite that directs everything, except PHP to index file
# Make sure you place this before your "location ~ \.php$ {" for the server configuration.
location / {
rewrite ^(.*)$ ./index.php last;
}
} |