Certbot: certbot --nginx๋ฅผ ์‹คํ–‰ํ•  ์ˆ˜ ์—†์Œ-UnicodeDecodeError : 'ascii'

์— ๋งŒ๋“  2017๋…„ 11์›” 12์ผ  ยท  14์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: certbot/certbot

๋‚ด ์šด์˜ ์ฒด์ œ๋Š” ๋‹ค์Œ๊ณผ ๊ฐ™์Šต๋‹ˆ๋‹ค (๋ฒ„์ „ ํฌํ•จ).

ArchLinux (์ปค๋„ 4.13.11-1)

(certbot-auto, OS ํŒจํ‚ค์ง€ ๊ด€๋ฆฌ์ž, pip ๋“ฑ)์„ ์‚ฌ์šฉํ•˜์—ฌ Certbot์„ ์„ค์น˜ํ–ˆ์Šต๋‹ˆ๋‹ค.

ํŒฉ๋งจ -S cerbot-nginx

์ด ๋ช…๋ น์„ ์‹คํ–‰ํ•˜๋ฉด ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ถœ๋ ฅ์ด ์ƒ์„ฑ๋ฉ๋‹ˆ๋‹ค.

cerbot --nginx

Certbot์˜ ๋™์ž‘์€ ๋‹ค์Œ๊ณผ ๊ฐ™์€ ์ด์œ ๋กœ ์ œ๊ฐ€ ์˜ˆ์ƒํ–ˆ๋˜ ๊ฒƒ๊ณผ ๋‹ฌ๋ž์Šต๋‹ˆ๋‹ค.

Saving debug log to /var/log/letsencrypt/letsencrypt.log
An unexpected error occurred:
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 330: ordinal not in range(128)
Please see the logfiles in /var/log/letsencrypt for more details.

๋‹ค์Œ์€ ๋ฌธ์ œ๋ฅผ ๋ณด์—ฌ์ฃผ๋Š” Certbot ๋กœ๊ทธ์ž…๋‹ˆ๋‹ค (์‚ฌ์šฉ ๊ฐ€๋Šฅํ•œ ๊ฒฝ์šฐ).

2017-11-12 15:15:18,497:DEBUG:certbot.main:certbot version: 0.19.0
2017-11-12 15:15:18,499:DEBUG:certbot.main:Arguments: ['--nginx']
2017-11-12 15:15:18,500:DEBUG:certbot.main:Discovered plugins: PluginsRegistry(PluginEntryPoint#manual,PluginEntryPoint#nginx,PluginEntryPoint#null,PluginEntryPoint#standalone,PluginEntryPoint#webroot)
2017-11-12 15:15:18,529:DEBUG:certbot.log:Root logging level set at 20
2017-11-12 15:15:18,531:INFO:certbot.log:Saving debug log to /var/log/letsencrypt/letsencrypt.log
2017-11-12 15:15:18,532:DEBUG:certbot.plugins.selection:Requested authenticator nginx and installer nginx
2017-11-12 15:15:18,557:DEBUG:certbot.log:Exiting abnormally:
Traceback (most recent call last):
  File "/usr/bin/certbot", line 11, in <module>
    load_entry_point('certbot==0.19.0', 'console_scripts', 'certbot')()
  File "/usr/lib/python3.6/site-packages/certbot/main.py", line 861, in main
    return config.func(config, plugins)
  File "/usr/lib/python3.6/site-packages/certbot/main.py", line 685, in run
    installer, authenticator = plug_sel.choose_configurator_plugins(config, plugins, "run")
  File "/usr/lib/python3.6/site-packages/certbot/plugins/selection.py", line 189, in choose_configurator_plugins
    authenticator = installer = pick_configurator(config, req_inst, plugins)
  File "/usr/lib/python3.6/site-packages/certbot/plugins/selection.py", line 25, in pick_configurator
    (interfaces.IAuthenticator, interfaces.IInstaller))
  File "/usr/lib/python3.6/site-packages/certbot/plugins/selection.py", line 77, in pick_plugin
    verified.prepare()
  File "/usr/lib/python3.6/site-packages/certbot/plugins/disco.py", line 248, in prepare
    return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
  File "/usr/lib/python3.6/site-packages/certbot/plugins/disco.py", line 248, in <listcomp>
    return [plugin_ep.prepare() for plugin_ep in six.itervalues(self._plugins)]
  File "/usr/lib/python3.6/site-packages/certbot/plugins/disco.py", line 130, in prepare
    self._initialized.prepare()
  File "/usr/lib/python3.6/site-packages/certbot_nginx/configurator.py", line 156, in prepare
    self.parser = parser.NginxParser(self.conf('server-root'))
  File "/usr/lib/python3.6/site-packages/certbot_nginx/parser.py", line 35, in __init__
    self.load()
  File "/usr/lib/python3.6/site-packages/certbot_nginx/parser.py", line 42, in load
    self._parse_recursively(self.config_root)
  File "/usr/lib/python3.6/site-packages/certbot_nginx/parser.py", line 53, in _parse_recursively
    trees = self._parse_files(filepath)
  File "/usr/lib/python3.6/site-packages/certbot_nginx/parser.py", line 203, in _parse_files
    parsed = nginxparser.load(_file)
  File "/usr/lib/python3.6/site-packages/certbot_nginx/nginxparser.py", line 122, in load
    return loads(_file.read())
  File "/usr/lib/python3.6/encodings/ascii.py", line 26, in decode
    return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 330: ordinal not in range(128)
2017-11-12 15:15:18,560:ERROR:certbot.log:An unexpected error occurred:

๋‹ค์Œ์€ ๋‚ด๊ฐ€ ๊ตฌ์„ฑ์ค‘์ธ ๋„๋ฉ”์ธ์— ๋Œ€ํ•œ ๊ด€๋ จ nginx ์„œ๋ฒ„ ๋ธ”๋ก ๋˜๋Š” Apache ๊ฐ€์ƒ ํ˜ธ์ŠคํŠธ์ž…๋‹ˆ๋‹ค.

user http;
worker_processes auto;
worker_cpu_affinity auto;
pcre_jit on;

events {
    worker_connections 2048;
}


http {
    include mime.types;
    default_type application/octet-stream;
    sendfile on;
    tcp_nopush on;
    aio threads;
    server_tokens off; # Security: Disables nginx version in error messages and in the โ€œServerโ€ response header field.
    charset utf-8; # Force usage of UTF-8
    index index.php index.html index.htm;
    server {
      listen 80;
      listen [::]:80;
      server_name domain.tld;
      root /usr/share/nginx/html;
      location / {
        index index.htm index.html;
      }

      # ACME challenge
      location ^~ /.well-known/acme-challenge/ {
        default_type "text/plain";
        root /var/lib/letsencrypt;
      }
    }
}
encodintype error nginx bug

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

@egberts ์‚ฌ์šฉ์ž๊ฐ€ ๋‹ค๋ฅธ ์Šค๋ ˆ๋“œ์— ๋Œ€ํ•œ ์ฃผ์„์„ ์ฝ์€ ํ›„ ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

grep -r -P '[^\x00-\x7f]' /etc/apache2 /etc/letsencrypt /etc/nginx

์ด ๋ช…๋ น์€ ์ฃผ์„์˜ ํ•œ .conf ํŒŒ์ผ์—์„œ ๋ฌธ์ œ๊ฐ€๋˜๋Š” ๋ฌธ์ž "ยด"๋ฅผ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค. ๊ทธ๊ฒƒ์„ ์ œ๊ฑฐํ•˜๊ณ  (์›ํ•˜๋Š”๋Œ€๋กœ ์ฃผ์„์„ ํŽธ์ง‘ ํ•  ์ˆ˜ ์žˆ์Œ) nginx๋ฅผ ๋‹ค์‹œ๋กœ๋“œํ•˜๋ฉด ๋ชจ๋“  ๊ฒƒ์ด ๋‹ค์‹œ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค.

๋ชจ๋“  14 ๋Œ“๊ธ€

ํ™•์‹คํžˆ ์ฒ˜๋ฆฌํ•ด์•ผํ•˜๋ฏ€๋กœ์ด ๋ฌธ์ œ๋ฅผ ์‚ดํŽด ๋ณด ๊ฒ ์ง€๋งŒ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋ ค๋ฉด server_tokens ์ง€์‹œ๋ฌธ์˜ ์ฃผ์„์—์„œ ํฐ ๋”ฐ์˜ดํ‘œ๋ฅผ ๋Œ€์ฒดํ•˜์‹ญ์‹œ์˜ค : โ€œServerโ€

๋ฟก๋ฟก

2018-05-05 12 : 28 : 44,181 : DEBUG : certbot.main : certbot ๋ฒ„์ „ : 0.22.2
2018-05-05 12 : 28 : 44,181 : DEBUG : certbot.main : ์ธ์ˆ˜ : [ '--nginx']
2018-05-05 12 : 28 : 44,181 : DEBUG : certbot.main : ๊ฒ€์ƒ‰๋œ ํ”Œ๋Ÿฌ๊ทธ์ธ : PluginsRegistry (PluginEntryPoint # manual, PluginEntryPoint # nginx, PluginEntryPoint # null, PluginEntryPoint # standalone, PluginEntryPoint # webroot)
2018-05-05 12 : 28 : 44,193 : DEBUG : certbot.log : ๋ฃจํŠธ ๋กœ๊น… ์ˆ˜์ค€์ด 20์œผ๋กœ ์„ค์ • ๋จ
2018-05-05 12 : 28 : 44,193 : INFO : certbot.log : /var/log/letsencrypt/letsencrypt.log์— ๋””๋ฒ„๊ทธ ๋กœ๊ทธ ์ €์žฅ
2018-05-05 12 : 28 : 44,194 : DEBUG : certbot.plugins.selection : ์š”์ฒญ ๋œ ์ธ์ฆ ์ž nginx ๋ฐ ์„ค์น˜ ํ”„๋กœ๊ทธ๋žจ nginx
2018-05-05 12 : 28 : 44,343 : DEBUG : certbot.log : ๋น„์ •์ƒ์ ์œผ๋กœ ์ข…๋ฃŒ :
์—ญ ์ถ”์  (๊ฐ€์žฅ ์ตœ๊ทผ ํ˜ธ์ถœ ๋งˆ์ง€๋ง‰) :
ํŒŒ์ผ "/ usr / bin / certbot", 11 ํ–‰, in
load_entry_point ( 'certbot == 0.22.2', 'console_scripts', 'certbot') ()
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/main.py", ์ค„ 1266, ์ฃผ
return config.func (config, plugins)
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/main.py", 1018 ํ–‰, ์‹คํ–‰ ์ค‘
์„ค์น˜ ํ”„๋กœ๊ทธ๋žจ, ์ธ์ฆ ์ž = plug_sel.choose_configurator_plugins (config, plugins, "run")
choose_configurator_plugins์—์žˆ๋Š” ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", 189 ํ–‰
์ธ์ฆ ์ž = ์„ค์น˜ ํ”„๋กœ๊ทธ๋žจ = pick_configurator (config, req_inst, plugins)
pick_configurator์˜ ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", 25 ํ–‰
(interfaces.IAuthenticator, interfaces.IInstaller))
pick_plugin์—์žˆ๋Š” ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/plugins/selection.py", 77 ํ–‰
Verified.prepare ()
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", 245 ํ–‰, ์ค€๋น„ ์ค‘
return [six.itervalues โ€‹โ€‹(self._plugins)์˜ plugin_ep์— ๋Œ€ํ•œ plugin_ep.prepare ()]
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", 245 ํ–‰
return [six.itervalues โ€‹โ€‹(self._plugins)์˜ plugin_ep์— ๋Œ€ํ•œ plugin_ep.prepare ()]
์ค€๋น„์ค‘์ธ ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot/plugins/disco.py", 126 ํ–‰
self._initialized.prepare ()
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot_nginx/configurator.py", 137 ํ–‰, ์ค€๋น„ ์ค‘
self.parser = parser.NginxParser (self.conf ( 'server-root'))
__init__์—์žˆ๋Š” ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", 38 ํ–‰
self.load ()
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", 45 ํ–‰,๋กœ๋“œ ์ค‘
self._parse_recursively (self.config_root)
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", 66 ํ–‰, _parse_recursively
self._parse_recursively (subentry [1])
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", 56 ํ–‰, _parse_recursively
๋‚˜๋ฌด = self._parse_files (filepath)
ํŒŒ์ผ "/usr/lib/python3/dist-packages/certbot_nginx/parser.py", 206 ํ–‰, _parse_files
๊ตฌ๋ฌธ ๋ถ„์„ ๋จ = nginxparser.load (_file)
"/usr/lib/python3/dist-packages/certbot_nginx/nginxparser.py"ํŒŒ์ผ, 123 ํ–‰,๋กœ๋“œ ์ค‘
๋ฐ˜ํ™˜ ๋ถ€ํ•˜ (_file.read ())
"/usr/lib/python3.4/encodings/ascii.py"ํŒŒ์ผ, 26 ํ–‰, ๋””์ฝ”๋”ฉ
return codecs.ascii_decode (input, self.errors) [0]
UnicodeDecodeError : 'ascii'์ฝ”๋ฑ์ด 31 ๋ฒˆ ์œ„์น˜์˜ 0xd1 ๋ฐ”์ดํŠธ๋ฅผ ๋””์ฝ”๋”ฉ ํ•  ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค : ์„œ ์ˆ˜๊ฐ€ ๋ฒ”์œ„์— ์—†์Šต๋‹ˆ๋‹ค (128).
2018-05-05 12 : 28 : 44,346 : ERROR : certbot.log : ์˜ˆ๊ธฐ์น˜ ์•Š์€ ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค.

์˜ˆ๋ฅผ ๋“ค์–ด MIME ์œ ํ˜• ํŒŒ์ผ์—๋Š” ๋‹ค์Œ ํ–‰์ด ํฌํ•จ๋ฉ๋‹ˆ๋‹ค.

application/vnd.geocube+xml                     g3 gยณ;

gยณ๋Š” UnicodeDecodeError๋ฅผ ๋ฐœ์ƒ์‹œํ‚ต๋‹ˆ๋‹ค.

> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(62)_parse_recursively()
-> elif entry[0] == ['http'] or entry[0] == ['server']:
(Pdb) l
 57             for tree in trees:
 58                 for entry in tree:
 59                     if _is_include_directive(entry):
 60                         # Parse the top-level included file
 61                         self._parse_recursively(entry[1])
 62  ->                 elif entry[0] == ['http'] or entry[0] == ['server']:
 63                         # Look for includes in the top-level 'http'/'server' context
 64                         for subentry in entry[1]:
 65                             if _is_include_directive(subentry):
 66                                 self._parse_recursively(subentry[1])
 67                             elif entry[0] == ['http'] and subentry[0] == ['server']:
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(64)_parse_recursively()
-> for subentry in entry[1]:
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(65)_parse_recursively()
-> if _is_include_directive(subentry):
(Pdb) subentry
['include', 'mime.types']
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(66)_parse_recursively()
-> self._parse_recursively(subentry[1])
(Pdb) s
--Call--
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(47)_parse_recursively()
-> def _parse_recursively(self, filepath):
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(55)_parse_recursively()
-> filepath = self.abs_path(filepath)
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(56)_parse_recursively()
-> trees = self._parse_files(filepath)
(Pdb) s
--Call--
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(189)_parse_files()
-> def _parse_files(self, filepath, override=False):
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(198)_parse_files()
-> files = glob.glob(filepath) # nginx on unix calls glob(3) for this
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(201)_parse_files()
-> trees = []
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(202)_parse_files()
-> for item in files:
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(203)_parse_files()
-> if item in self.parsed and not override:
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(205)_parse_files()
-> try:
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(206)_parse_files()
-> with open(item) as _file:
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/parser.py(207)_parse_files()
-> parsed = nginxparser.load(_file)
(Pdb) s
--Call--
> /usr/lib/python3.6/site-packages/certbot_nginx/nginxparser.py(115)load()
-> def load(_file):
(Pdb) n
> /usr/lib/python3.6/site-packages/certbot_nginx/nginxparser.py(123)load()
-> return loads(_file.read())
(Pdb) loads
<function loads at 0x7faacac85048>
(Pdb) s
--Call--
> /usr/lib/python3.6/encodings/ascii.py(25)decode()
-> def decode(self, input, final=False):
(Pdb) --KeyboardInterrupt--
(Pdb) n
> /usr/lib/python3.6/encodings/ascii.py(26)decode()
-> return codecs.ascii_decode(input, self.errors)[0]
(Pdb) n
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 10453: ordinal not in range(128)
> /usr/lib/python3.6/encodings/ascii.py(26)decode()
-> return codecs.ascii_decode(input, self.errors)[0]

์ถ”๊ฐ€ ์ •๋ณด์— ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค!

@egberts ์‚ฌ์šฉ์ž๊ฐ€ ๋‹ค๋ฅธ ์Šค๋ ˆ๋“œ์— ๋Œ€ํ•œ ์ฃผ์„์„ ์ฝ์€ ํ›„ ๋‹ค์Œ ๋ช…๋ น์„ ์‹คํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค.

grep -r -P '[^\x00-\x7f]' /etc/apache2 /etc/letsencrypt /etc/nginx

์ด ๋ช…๋ น์€ ์ฃผ์„์˜ ํ•œ .conf ํŒŒ์ผ์—์„œ ๋ฌธ์ œ๊ฐ€๋˜๋Š” ๋ฌธ์ž "ยด"๋ฅผ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค. ๊ทธ๊ฒƒ์„ ์ œ๊ฑฐํ•˜๊ณ  (์›ํ•˜๋Š”๋Œ€๋กœ ์ฃผ์„์„ ํŽธ์ง‘ ํ•  ์ˆ˜ ์žˆ์Œ) nginx๋ฅผ ๋‹ค์‹œ๋กœ๋“œํ•˜๋ฉด ๋ชจ๋“  ๊ฒƒ์ด ๋‹ค์‹œ ์ž‘๋™ํ–ˆ์Šต๋‹ˆ๋‹ค.

@TommyZG ๋Š” ์–ด๋–ค ํŒŒ์ผ์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

Windows ์›๊ฒฉ์—์„œ certbot-auto๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด์ด ์˜ค๋ฅ˜๊ฐ€ ๋ฐœ์ƒํ•˜์ง€๋งŒ Linux ์›๊ฒฉ์—์„œ ์‚ฌ์šฉํ•˜๋ฉด ํ›Œ๋ฅญํ•˜๊ฒŒ ์ž‘๋™ํ•ฉ๋‹ˆ๋‹ค.

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค. ๋‹ค์Œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค (Ubuntu์—์„œ).

  1. ์ฝ˜์†”์—์„œ ์‹คํ–‰ :
    bash sudo locale-gen "en_US.UTF-8" sudo dpkg-reconfigure locales
  2. ๋ผ์ธ ์ถ”๊ฐ€ LC_ALL="en_US.UTF-8" ํŒŒ์ผ์— /etc/default/locale .
  3. SSH๋ฅผ ๋‹ค์‹œ โ€‹โ€‹์—ฐ๊ฒฐํ•˜์‹ญ์‹œ์˜ค.

์‹คํ–‰ ํ›„ cerbot --nginx ์„ฑ๊ณต.

์•ˆ๋…•ํ•˜์„ธ์š”! ๊ทธ ์ด์œ ๋Š” nginx ๊ตฌ์„ฑ์— ASCII๊ฐ€ ์•„๋‹Œ ๋ฌธ์ž๊ฐ€์žˆ๋Š” ๊ฒฝ์šฐ (์ฃผ์„์—๋„ !!!) ์ž‘๋™ํ•˜์ง€ ์•Š๊ธฐ ๋•Œ๋ฌธ์ž…๋‹ˆ๋‹ค.

# 5341์— PR์ด์žˆ๋Š” ์ค‘๋ณต # 5337์„ ์„ ํ˜ธํ•˜์—ฌ ๋‹ซ์Šต๋‹ˆ๋‹ค.

@TommyZG ๋Š” ์–ด๋–ค ํŒŒ์ผ์„ ๋ณ€๊ฒฝํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๊นŒ?

๋‚ด .conf ํŒŒ์ผ ์ค‘ ํ•˜๋‚˜์—์žˆ์—ˆ์Šต๋‹ˆ๋‹ค. ๋‹ค๋ฅธ ์‚ฌ๋žŒ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ฃผ์„ ๋ผ์ธ์—์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

๋น„์Šทํ•œ ๋ฌธ์ œ๊ฐ€ ๋ฐœ์ƒํ–ˆ์Šต๋‹ˆ๋‹ค. /etc/nginx/conf.d/default.conf 13 ~ 17 ํ–‰ :

# 1) limit_req  ^`^s to limit the rate of requests from one IP
# 2) limit_conn  ^`^s to limit the number of connections from one IP
# 3) client_body_timeout  ^`^s to close the connections with slow body
# 4) client_header_timeout  ^`^s to close the connections with slow headers
# 5) send_timeout  ^`^s If the client does not receive anything within this time, the connection is closed.

๋‚˜๋Š” ๊ทธ ์ฃผ์„์„ ์ œ๊ฑฐํ–ˆ๊ณ  ํšจ๊ณผ๊ฐ€ ์žˆ์—ˆ๋‹ค.

grep ํŒ์— ๋Œ€ํ•ด @egberts & @TommyZG ์—๊ฒŒ ๊ฐ์‚ฌ๋“œ๋ฆฝ๋‹ˆ๋‹ค.

Hy โœŒ๐Ÿป,
๋‹ค๋ฅธ ํ„ฐ๋ฏธ๋„ ๋งŒ ์‚ฌ์šฉํ•ด์•ผํ•ฉ๋‹ˆ๋‹ค.
Mac ํ„ฐ๋ฏธ๋„์„ ์‚ฌ์šฉํ•˜๋Š” ๋™์•ˆ Windows bash๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ์ž‘๋™ํ•˜๋Š” ๊ฒƒ๊ณผ ๋™์ผํ•œ ๋ฌธ์ œ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‚˜๋Š” ๊ฐ™์€ ๋ฌธ์ œ๊ฐ€ ์žˆ์—ˆ๋‹ค. ๋‹ค์Œ ํ•ด๊ฒฐ ๋ฐฉ๋ฒ•์„ ์ฐพ์•˜์Šต๋‹ˆ๋‹ค (Ubuntu์—์„œ).

  1. ์ฝ˜์†”์—์„œ ์‹คํ–‰ :
    shell sudo locale-gen "en_US.UTF-8" sudo dpkg-reconfigure locales
  2. ๋ผ์ธ ์ถ”๊ฐ€ LC_ALL="en_US.UTF-8" ํŒŒ์ผ์— /etc/default/locale .
  3. SSH๋ฅผ ๋‹ค์‹œ โ€‹โ€‹์—ฐ๊ฒฐํ•˜์‹ญ์‹œ์˜ค.

์‹คํ–‰ ํ›„ cerbot --nginx ์„ฑ๊ณต.

๊ณ ๋งˆ์›Œ์š”.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰