nginx가 문자 m에 대해 불평하는 이유는 무엇입니까?

nginx가 문자 m에 대해 불평하는 이유는 무엇입니까?

그래서 역방향 프록시에 대한 사용자 정의 conf 파일이 있고 sudo nginx -t를 실행하면 다음과 같은 결과가 나타납니다.

nginx: [emerg] unexpected "m" in /etc/nginx/sites-enabled/<domain>.conf:19
nginx: configuration file /etc/nginx/nginx.conf test failed

다음은 계속 진행하기 전에 통과하려는 구성 콘텐츠 또는 블록입니다.

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name <server_url>;
    ssl_certificate /config/.acme.sh/your-domain/fullchain.cer;
    ssl_certificate_key /config/.acme.sh/your-domain/your-domain.key;
    access_log /var/log/nginx/<server_url>.access.log;
    error_log /var/log/nginx/<server_url>.error.log;          
    ssl_session_timeout 1d;          
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;         
    ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-S$         
    ssl_prefer_server_ciphers on;         
    ssl_session_cache shared:SSL:10m;  
    #dh param         
    ssl_dhparam /config/ssl/dhparam.pem;  
    # Enable HTTP Strict-Transport-Security 
    # If you have a subdomain of your site, 
    # be careful to use the 'includeSubdomains' options         
    add_header Strict-Transport-Security "max-age=63072000; 
    includeSubdomains; preload";  
    # XSS Protection for Nginx web server         
    add_header X-Frame-Options DENY;         
    add_header X-XSS-Protection "1; mode=block";         
    add_header X-Content-Type-Options nosniff;         
    ssl_session_cache shared:SSL:10m;         
    add_header X-Robots-Tag none;    
    client_max_body_size 0;   
    proxy_http_version 1.1;   
    proxy_buffering off;   
    proxy_set_header Upgrade $http_upgrade;   
    proxy_set_header Connection "Upgrade";   
    proxy_set_header Host $host;   
    proxy_set_header X-Real-IP $remote_addr;   
    proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;    
    location / {     
        proxy_pass https://<ip_address>;   
    } 
}   

이론적으로 add_header 라인은 가치가 있는 라인 19가 될 것입니다.

생각

감사해요.

JR

답변1

창에 맞는 크기로 잘린 일부 편집기에서 ssl_ciphers 행을 복사했습니다. 줄이 기본적으로 어떻게 끝나는지 확인하세요 ECDHE-RSA-AES256-GCM-S$. 이는 유효한 암호 이름이 아닙니다. 더 중요한 것은, 그것도 닫는 인용문이 아니라는 점입니다.

이는 다음을 의미합니다.모든 것최대 및 포함은 ... Strict-Transport-Security여전히 ​​암호 목록의 일부이며 앞의 인용문은 max-age여는 인용문이 아니라 닫는 인용문입니다. 기본적으로 다음이 있습니다.

ssl_ciphers "blah blah blah "max-age=63072000;

관련 정보