Nginx の設定ファイル
Nginx で PHP,Python,Let's Encrypt を使う時の設定ファイルです。
Ubuntu 18.04 で確認しました。
サーバー名は、example.com とします。
/etc/nginx/sites-available/default
#
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.html index.htm index.php;
server_name _;
location / {
try_files $uri $uri/ =404;
}
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
#
location ~ \.py$ {
gzip off;
include fastcgi_params;
fastcgi_pass unix:/var/run/fcgiwrap.socket;
fastcgi_index index.py;
fastcgi_param SCRIPT_FILENAME /var/www/html$fastcgi_script_name;
}
#
listen 443 ssl;
server_name example.com;
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem;
}
#
Author And Source
この問題について(Nginx の設定ファイル), 我々は、より多くの情報をここで見つけました https://qiita.com/ekzemplaro/items/e440d09f7e7c74ff5c48著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .