安裝套件(有關
PHP-FPM 說明)
# apt install nginx php-fpm php-mysql
# apt install mysql-server
修改配置檔 /etc/nginx/sites-enabled/default
# SSL configuration
listen 443 ssl default_server;
ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/domain.com/chain.pem;
include snippets/ssl.conf;
# With php-fpm (or other unix sockets):
location ~ \.php$ {
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
}
沒有留言:
張貼留言