Skip to content

Commit 65ad286

Browse files
committed
### Added
* Added handling of missing `.php` files routed through Craft * Added `404` handler * Added `.gitignore` ### Changed * Removed `html` and other non-cacheable files from matching in `expires.conf`
1 parent 0686e0f commit 65ad286

File tree

5 files changed

+25
-6
lines changed

5 files changed

+25
-6
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# MISC FILES / aaw -- 2016.10.26
2+
.cache
3+
.DS_Store
4+
.idea
5+
.project
6+
.settings
7+
*.esproj
8+
*.sublime-workspace
9+
*.sublime-project
10+
*.tmproj
11+
*.tmproject
12+
Thumbs.db
13+
/logs/*
14+
/yarn-error.log

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# Nginx-Craft Changelog
22

3+
## 1.0.6 - 2017.07.06
4+
### Added
5+
* Added handling of missing `.php` files routed through Craft
6+
* Added `404` handler
7+
* Added `.gitignore`
8+
9+
### Changed
10+
* Removed `html` and other non-cacheable files from matching in `expires.conf`
11+
312
## 1.0.5 - 2017.03.27
413
### Added
514
* Added `webp` to the `expires` header support

forge-example/NginxConfiguration.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ server {
8787

8888
# php-fpm configuration
8989
location ~ [^/]\.php(/|$) {
90+
try_files $uri $uri/ /index.php?$query_string;
9091
fastcgi_split_path_info ^(.+\.php)(/.+)$;
9192
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
9293
fastcgi_index index.php;

nginx-partials/expires.conf

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,6 @@
1010
# future (if the default expire rule is 1 month). Therefore, do not use a
1111
# default expire rule with nginx unless your site is completely static
1212

13-
# cache.appcache, your document html and data
14-
location ~* \.(?:manifest|appcache|html?|json)$ {
15-
expires -1;
16-
access_log /var/log/nginx/static.log;
17-
}
18-
1913
# Feed
2014
location ~* \.(?:rss|atom)$ {
2115
expires 1h;

sites-available/somedomain.com.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ server {
103103

104104
# php-fpm configuration
105105
location ~ [^/]\.php(/|$) {
106+
try_files $uri $uri/ /index.php?$query_string;
106107
fastcgi_split_path_info ^(.+\.php)(/.+)$;
107108
fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
108109
fastcgi_index index.php;

0 commit comments

Comments
 (0)