LoginSignup
2
1

More than 3 years have passed since last update.

Synology の nginx について

Last updated at Posted at 2021-04-25

Synology の Web サーバーについて分かったことです。
(DS220j で調べました。)
Default の Webサーバーは nginx です。

$ nginx -V
nginx version: nginx/1.16.1
TLS SNI support enabled

root は /volume1/web です。
nginx の設定ファイルは、/etc/nginx にあります。

$ ls /etc/nginx
app.d         fastcgi_params  mime.types          proxy.conf     uwsgi_params
conf.d        koi-utf         nginx.conf          scgi_params    win-utf
fastcgi.conf  koi-win         nginx.conf.default  sites-enabled

nginx の再起動は次のように行います。

sudo synoservicecfg --restart nginx

再起動すると /etc/nginx/nginx.conf は上書きされます。

再起動時の nginx.conf は、次の mustache ファイルから生成されます。

$ ls /usr/syno/share/nginx
Alias_v2.mustache           DSM.mustache          open_file_cache.mustache
avahi.mustache              error.html            optimization.mustache
cgi.mustache                error_page.mustache   Portal.mustache
cgi.pass.mustache           Firewall.mustache     server.mustache
conf.d                      gzip.mustache         SSLProfile.mustache
deny.mustache               HSTS.mustache         SynoSharing.mustache
deny.PhotoStation.mustache  LetsEncrypt.mustache  WWW_Main.mustache
deny.synoman.mustache       logo.jpg              WWWService.mustache
DSM_Main.mustache           nginx.mustache        X-Accel.mustache
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1