Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Infrastructure
download
Commits
630f0c17
Commit
630f0c17
authored
Apr 19, 2017
by
totten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move more redirect rules to nginx config file. Reduce load.
parent
1beaea79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
11 deletions
+12
-11
nginx.common.conf
nginx.common.conf
+11
-0
nginx.example.txt
nginx.example.txt
+1
-8
web/index.php
web/index.php
+0
-3
No files found.
nginx.common.conf
0 → 100644
View file @
630f0c17
## Several subdirectories map cleanly to gcloud bucket.
rewrite
^/(
civicrm
-
l10n
-
core
|
civix
|
cv
|
git
-
scan
|
civistrings
|
amp
|
joomlatools
-
console
)/(.*)$
https
://
storage
.
googleapis
.
com
/
civicrm
/$
1
/$
2
last
;
location
/ {
try_files
$
uri
@
rewrite
;
}
location
@
rewrite
{
## Primary tarballs in the root don't map cleanly.
rewrite
^/(.*)$ /
index
.
php
?
q
=$
1
;
}
nginx.example.txt
View file @
630f0c17
...
...
@@ -5,14 +5,7 @@ server {
listen [::]:80;
root /var/www/example.com/web;
location / {
try_files $uri @rewrite;
}
location @rewrite {
rewrite ^/(.*)$ /index.php?q=$1;
}
include /var/www/example.com/nginx.common.conf;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
...
...
web/index.php
View file @
630f0c17
...
...
@@ -12,9 +12,6 @@ function pick_url($path) {
return
"
$base
/civicrm-stable/
$version
/
$path
"
;
}
}
if
(
preg_match
(
';^(civicrm-l10n-core|civix|cv|git-scan|civistrings|amp|joomlatools-console)/;'
,
$path
))
{
return
"
$base
/
$path
"
;
}
return
NULL
;
}
...
...
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