MoinQ:

nginx

1. 起動

/systemd

ConoHa 2GB での問題

nginx.service: Can't open PID file /run

https://askubuntu.com/questions/1113319/nginx-service-cant-open-pid-file-run-nginx

Systemd does NOT create PID files by itsef. It expects the executables to create it (usually within the /run, or specifically for Ubuntu within the /var/run folder).

Nginx server as forking process does support creating a PID file. To change its location, you may use the pid directive in its nginx.conf file, which you may find in the /etc/nginx folder for the standard package. This pid directive defaults to logs/nginx.pid.

ngix 1.24.0 に更新 nginx

http://tokyo.qmail.jp/ 動作確認用 OK -- ToshinoriMaeno 2022-09-05 00:04:38

2. アクセス制限

IPアドレスでのアクセス制御 まずは IPアドレスによる禁止を試す。-- ToshinoriMaeno 2022-09-16 08:28:54

サーバ単位:Serverモジュールに記述(または、Httpモジュール)

server {
    allow 'アクセス許可するIPアドレス';
    deny all;
}

Restricting Access https://mogile.web.fc2.com/nginx/admin-guide/restricting-access.html

ディレクトリ単位で

location / {
    allow 192.168.1.1/24;
    allow 127.0.0.1;
    deny 192.168.1.2;
    deny all;
}


CategoryDns CategoryWatch CategoryTemplate

MoinQ: Ubuntu/22.04LTS/nginx (last edited 2024-03-25 02:13:43 by ToshinoriMaeno)