Put nginx 1.18 in CentOS6 and set reverse proxy

Premise

Download

nginx.png

Installation

#Pre-installation test
rpm -ivh --test "nginx-1.18.0-2.el6.ngx.x86_64.rpm"

#Installation
rpm -ivh "nginx-1.18.0-2.el6.ngx.x86_64.rpm"

#View list of installed files
rpm -qal nginx

Configuration

server {
    listen       443 ssl;
    server_name  server.local;

    # hide nginx version.
    server_tokens off;

    # ssl_verify_client      on;
    ssl_verify_client      off;
    ssl_certificate        /etc/nginx/wildcard_local/wildcard_local.crt;
    ssl_certificate_key    /etc/nginx/wildcard_local/private/wildcard_local.key;
    ssl_client_certificate /etc/nginx/wildcard_local/ca.crt;
    ssl_ciphers            'HIGH:!aNULL:!MD5';
    ssl_protocols          TLSv1 TLSv1.1 TLSv1.2 TLSv1.3;

    proxy_set_header    Host		server.local;
    proxy_set_header    X-Real-IP	$remote_addr;
    proxy_set_header    X-Forwarded-Host	$host;
    proxy_set_header    X-Forwarded-Server	$host;
    proxy_set_header    X-Forwarded-For	$proxy_add_x_forwarded_for;

    location / {
        proxy_pass      http://server.local;
    }

}
#Start-up
service nginx start

Operation check

When you access https://server.local Confirm that the contents of http://server.local are displayed.

Recommended Posts

Put nginx 1.18 in CentOS6 and set reverse proxy
Put SSL (certbot) in GCP + CentOS6 (VM) + nginx
Put java8 in centos7
Memorandum to make CentOS 7.9 and put pacemaker
Installing and configuring ClipBucket and Nginx on CentOS 7
Put CSV files containing "'" and "" "in MySQL in Ruby 2.3
Just put `clang 12.0.0` in macOS` Catalina` and put `ruby 3.0.0`
Put java8 in centos7
Put SSL (certbot) in GCP + CentOS6 (VM) + nginx
Put nginx 1.18 in CentOS6 and set reverse proxy
Disable IPv6 in CentOS8
Install CentOS Stream8 in VirtualBox
When I try to put centos in VMware, pane is dead
Steps to set up Postfix and Dovecot on CentOS 8.3
Reverse Enum constants from strings and values in Java
I want to Flash Attribute in Spring even if I set a reverse proxy! (do not do)