Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Owain Jones
gliders-webserver
Commits
27276a4b
Commit
27276a4b
authored
9 years ago
by
Owain Jones
Browse files
Options
Download
Email Patches
Plain Diff
updated gliders config to use maintenance page if .maintenance file is found
parent
fc26c753
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
63 deletions
+19
-63
gliders.nginx.conf
gliders.nginx.conf
+19
-63
No files found.
gliders.nginx.conf
View file @
27276a4b
...
...
@@ -34,11 +34,20 @@ server {
rewrite
^/
app
\.
php
/?(.*)$ /$
1
permanent
;
location
/ {
limit_req
zone
=
gliders
burst
=
5
;
index
app
.
php
;
limit_req
zone
=
gliders
burst
=
5
;
set
$
index_file
app
.
php
;
if
(-
f
$
document_root
/.
maintenance
) {
return
503
;
}
index
$
index_file
;
try_files
$
uri
@
rewriteapp
;
}
error_page
503
@
maintenance
;
location
@
maintenance
{
rewrite
^(.*)$ /
maintenance
.
html
break
;
}
location
~ ^/(
images
|
fonts
|
css
|
js
) {
access_log
off
;
error_log
off
;
...
...
@@ -99,70 +108,17 @@ server {
location
/ {
limit_req
zone
=
gliders
burst
=
5
;
index
app_dev
.
php
;
set
$
index_file
app
.
php
;
if
(-
f
$
document_root
/.
maintenance
) {
return
503
;
}
index
$
index_file
;
try_files
$
uri
@
rewriteapp
;
}
location
~ ^/(
images
|
fonts
|
css
|
js
) {
access_log
off
;
error_log
off
;
try_files
$
uri
=
404
;
expires
1
y
;
add_header
Cache
-
Control
"public"
;
}
location
~ ^/
images
/
vehicles
/(?<
vehicle_type
>[
a
-
zA
-
Z0
-
9
]+)
_
(?<
vehicle_name
>[
a
-
zA
-
Z0
-
9
]+)\.(
png
|
jpg
)$ {
access_log
off
;
error_log
off
;
try_files
$
uri
images
/
vehicles
/$
vehicle_type
.
png
=
404
;
}
location
/
static
/
logs
{
alias
/
var
/
gliders
/
logs
;
}
location
/
var
/
gliders
/
logs
{
alias
/
var
/
gliders
/
logs
;
}
location
/
static
{
alias
/
var
/
gliders
/
static
;
}
location
@
rewriteapp
{
rewrite
^(.*)$ /
app_dev
.
php
/$
1
last
;
}
# pass the PHP scripts to FastCGI server from upstream phpfcgi
location
~ ^/(
app
|
app_dev
|
config
)\.
php
(/|$) {
fastcgi_pass
phpfcgi
;
include
fastcgi_params
;
fastcgi_split_path_info
^(.+\.
php
)(/.*)$;
fastcgi_param
SCRIPT_FILENAME
$
symfony_root_dev
/
web
$
fastcgi_script_name
;
fastcgi_param
HTTPS
off
;
}
}
server
{
listen
8000
;
root
$
symfony_root_dev
/
web
;
error_log
/
var
/
log
/
nginx
/
dev
.
gliders
.
error
.
log
;
access_log
/
var
/
log
/
nginx
/
dev
.
gliders
.
access
.
log
;
# Enable compression. Very helpful when we're getting stuff like
# large amounts of vehicle tracks in JSON form!
gzip
on
;
gzip_types
text
/
plain
application
/
xml
text
/
html
text
/
css
application
/
json
application
/
x
-
javascript
text
/
xml
text
/
javascript
;
# strip app.php/ prefix if it is present
rewrite
^/
app_dev
\.
php
/?(.*)$ /$
1
permanent
;
location
/ {
limit_req
zone
=
gliders
burst
=
5
;
index
app_dev
.
php
;
try_files
$
uri
@
rewriteapp
;
error_page
503
@
maintenance
;
location
@
maintenance
{
rewrite
^(.*)$ /
maintenance
.
html
break
;
}
location
~ ^/(
images
|
fonts
|
css
|
js
) {
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment