Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
sysadmin
/
acme-ssl
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 52eb97d6
authored
Nov 21, 2016
by
Никита Миропольский
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
упростил конфиг для очевидности
1 parent
1a7a1d84
Pipeline
#1993
for
52eb97d6
skipped
in 0 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
21 deletions
nginx.conf
nginx.conf
View file @
52eb97d
# нужно прописать в конфиге nginx использование сертификатов
# из папки /var/cache/acme
# и альяс .well-known/acme-challenge папки /var/cache/acme/challenges
server
{
listen
80
;
server_name
ggg.ashmanov.com
;
server_tokens
off
;
access_log
/var/log/nginx/gitlab_access.log
;
error_log
/var/log/nginx/gitlab_error.log
;
server_name
....
;
# запросы acme-challenge
location
~
^/\.well-known/acme-challenge/([a-zA-Z0-9_-]*)$
{
...
...
@@ -12,7 +12,7 @@ server {
alias
/var/cache/acme/challenges/
$1
;
}
# остальные запросы
# остальные запросы
отправляем на HTTPS
location
/
{
return
301
https://
$server_name$request_uri
;
}
...
...
@@ -20,23 +20,10 @@ server {
server
{
listen
443
ssl
;
server_name
ggg.ashmanov.com
;
server_tokens
off
;
access_log
/var/log/nginx/gitlab_ssl_access.log
;
error_log
/var/log/nginx/gitlab_ssl_error.log
;
server_name
....
;
ssl_certificate
/var/cache/acme/site.crt
;
ssl_certificate_key
/var/cache/acme/site.key
;
# простейшая защита от XSS
add_header
X-XSS-Protection
"1
;
mode=block"
;
add_header
X-Content-Type-Options
nosniff
;
add_header
X-Frame-Options
DENY
;
if
(
$http_host
!=
$server_name
)
{
return
301
https://
$server_name$request_uri
;
}
include
gitlab.conf
;
....
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment