Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cern-drupal-distribution
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal
paas
cern-drupal-distribution
Commits
e91f75a1
Commit
e91f75a1
authored
4 years ago
by
Ismael Posada Trobo
Browse files
Options
Downloads
Patches
Plain Diff
tests
parent
fae7cbb4
Branches
perf-nginx
No related tags found
1 merge request
!11
Perf nginx
Pipeline
#2698289
passed
4 years ago
Stage: nginx
Stage: sitebuilder
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
images/nginx/config/default.conf
+23
-28
23 additions, 28 deletions
images/nginx/config/default.conf
with
23 additions
and
28 deletions
images/nginx/config/default.conf
+
23
−
28
View file @
e91f75a1
...
...
@@ -2,6 +2,8 @@ upstream php {
server
unix
:/
var
/
run
/
drupal
.
sock
;
}
#proxy_cache_path /var/cache/nginx keys_zone=one:10m max_size=200m;
server
{
#listen 8080 ssl;
listen
8080
;
...
...
@@ -20,10 +22,27 @@ server {
gzip_comp_level
5
;
gzip_types
application
/
json
text
/
css
text
/
javascript
application
/
x
-
javascript
application
/
javascript
image
/
svg
+
xml
;
gzip_proxied
any
;
sendfile
on
;
keepalive_timeout
25
;
etag
off
;
# Disables specifying the port in absolute redirects
port_in_redirect
off
;
location
/ {
# try_files $uri @rewrite; # For Drupal <= 6
try_files
$
uri
/
index
.
php
?$
query_string
;
# For Drupal >= 7
}
# https://drupal.stackexchange.com/questions/192151/cannot-install-any-theme
rewrite
^/
core
/
authorize
.
php
/
core
/
authorize
.
php
(.*)$ /
core
/
authorize
.
php
$
1
;
location
@
rewrite
{
rewrite
^/(.*)$ /
index
.
php
?
q
=$
1
;
}
location
= /
favicon
.
ico
{
log_not_found
off
;
access_log
off
;
...
...
@@ -47,10 +66,8 @@ server {
location
~* \.(
txt
|
log
)$ {
allow
192
.
168
.
0
.
0
/
16
;
deny
all
;
}
}
# https://drupal.stackexchange.com/questions/192151/cannot-install-any-theme
rewrite
^/
core
/
authorize
.
php
/
core
/
authorize
.
php
(.*)$ /
core
/
authorize
.
php
$
1
;
location
~ \..*/.*\.
php
$ {
return
403
;
}
...
...
@@ -74,16 +91,7 @@ server {
# as Subversion or Git to store control files.
location
~ (^|/)\. {
return
403
;
}
location
/ {
# try_files $uri @rewrite; # For Drupal <= 6
try_files
$
uri
/
index
.
php
?$
query_string
;
# For Drupal >= 7
}
location
@
rewrite
{
rewrite
^/(.*)$ /
index
.
php
?
q
=$
1
;
}
}
# Don't allow direct access to PHP files in the vendor directory.
location
~ /
vendor
/.*\.
php
$ {
...
...
@@ -135,23 +143,10 @@ server {
location
~* \.(
js
|
css
|
png
|
jpg
|
jpeg
|
gif
|
ico
|
svg
)$ {
try_files
$
uri
@
rewrite
;
expires
max
;
access_log
off
;
log_not_found
off
;
}
location
^~ /
simplesaml
{
alias
/
app
/
vendor
/
simplesamlphp
/
simplesamlphp
/
www
;
location
~ ^(?<
prefix
>/
simplesaml
)(?<
phpfile
>.+?\.
php
)(?<
pathinfo
>/.*)?$ {
include
fastcgi_params
;
fastcgi_pass
php
;
fastcgi_index
index
.
php
;
fastcgi_split_path_info
^(.+?\.
php
)(/.+)$;
fastcgi_param
SCRIPT_FILENAME
$
document_root
$
phpfile
;
fastcgi_param
PATH_INFO
$
pathinfo
if_not_empty
;
}
}
# We want to make the redirection https://sitename.web.cern.ch/sitename/sites/something to https://sitename.web.cern.ch/sites/default/.
# This location matches any url containing /sites/sitename/.../file and redirects to /sites/default/.../file.
# It omits redirection for urls containing /sites/default.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment