Created
February 19, 2015 00:50
-
-
Save hiroharu8864/34eff07d9fd5410f2d8d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
・環境 | |
nginx version: nginx/1.7.10 | |
Jenkins 1.598 | |
http { | |
ssl_session_cache shared:SSL:10m; | |
ssl_session_timeout 10m; | |
include /etc/nginx/mime.types; | |
default_type application/octet-stream; | |
map $uri $loggable { | |
~*\.(js|css|png|jpg|jpeg|gif|ico|woff) 0; | |
default 1; | |
} | |
log_format ltsv 'time:$time_local\t' | |
'host:$remote_addr\t' | |
'request:$request\t' | |
'status:$status\t' | |
'size:$body_bytes_sent\t' | |
'referer:$http_referer\t' | |
'ua:$http_user_agent\t' | |
'reqtime:$request_time\t' | |
'upsttime:$upstream_response_time'; | |
access_log /var/log/nginx/access.log ltsv if=$loggable; | |
keepalive_timeout 65; | |
server_tokens off; | |
server { | |
listen 443 ssl; | |
server_name localhost; | |
ssl on; | |
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
client_max_body_size 100m; | |
keepalive_timeout 70; | |
ssl_certificate /path/to/ssl_certificate; | |
ssl_certificate_key /path/to/ssl_certificate_key; | |
rewrite ^/$ /jenkins/ redirect; | |
# Add trailing slash to */jenkins requests. | |
rewrite /jenkins$ $scheme://$host$uri/ permanent; | |
location /jenkins { | |
proxy_pass http://127.0.0.1:8080/jenkins; | |
proxy_redirect http:// https://; | |
proxy_set_header Host $host; | |
proxy_set_header X-Real-IP $remote_addr; | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto https; | |
} | |
} | |
} | |
proxy_redirectを記述しないと、一部のメニューのリンクがhttp://になる。 | |
設定で対処できるのであれば、対処したい。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment