Nginxã§SSLã©ããã¼
ã¯ã©ã¤ã¢ã³ã---(HTTPS)---Nginx---(HTTP)---Webãµã¼ã
ã¨ãã使ãæ¹ãã§ããã
user nginx; worker_processes 4; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { upstream web { server 192.168.0.8:80; } # Webãµã¼ãã«æ¯ãåã server { listen 443; server_name www.taslam-example.jp; # --------------- SSLã®è¨å®ãããã --------------- ssl on; # ãµã¼ã証ææ¸ï¼ãµã¼ã証ææ¸ã«ä¸éCA証ææ¸ãé£çµãããã®ï¼ ssl_certificate /usr/local/certs/chained.crt; # ç§å¯éµ ssl_certificate_key /usr/local/certs/server.key; # --------------- SSLã®è¨å®ããã¾ã§ --------------- proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_redirect false; proxy_max_temp_file_size 0; location / { proxy_pass http://web; break; } } }