aboutsummaryrefslogtreecommitdiffstats
path: root/.ht-nginx
blob: ca9d22d64d8adbeb18cd20fcbfbe4fcedd97c882 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
# nginx configuration                        [Thomas Lange <code@nerdmind.de>] #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
#                                                                              #
# This file contains the configuration from the Apaches .htaccess file written #
# for the nginx high performance web server. Put the content of this file into #
# the "server {}" block of your nginx virtual host configuration file. If your #
# blog is installed in a sub directory, you might need to adjust this rules!   #
#                                                                              #
# How to setup PHP and passing requests via FastCGI to PHP-FPM is your job. If #
# you encounter a "403 Forbidden" error on the home page, please make sure you #
# have configured your nginx virtual host to look for an index.php file:       #
#                                                                              #
# index index.php [...];                                                       #
#                                                                              #
#%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%#

#===============================================================================
# Error pages
#===============================================================================
error_page 403 /403.php;
error_page 404 /404.php;

#===============================================================================
# Forbidden directories
#===============================================================================
location ~ ^/(.git|core|theme/([^/]+)/(html|lang))/ {
	return 403;
}

#===============================================================================
# Pass requests to index.php
#===============================================================================
location / {
	try_files $uri $uri/ /index.php?$args;
}