sh Scaleway Letsencrypt LEMP

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Scaleway Letsencrypt LEMP相关的知识,希望对你有一定的参考价值。

sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0-fpm
sudo apt-get install php7.0-sqlite3
sudo apt-get install php7.0-gd
sudo apt-get install php7.0-mbstring
sudo apt-get install php7.0-dom
sudo apt-get install php7.0-curl
sudo apt-get install php7.0-bcmath
sudo service nginx restart

sudo apt-get unzip
wget https://dl.eff.org/certbot-auto
chmod a+x certbot-auto
./certbot-auto certonly --webroot -w /var/www/my_website -d EXAMPLE.com
# Hey! I'm your web server configuration, it's a pleasure to meet you :)

server {
       # Replace the following line with your domain name
       server_name EXAMPLE.com;

       # You can safely leave the rest as if, unless you know what you
       # are doing.
       listen 443 ssl;

        ssl_certificate /etc/letsencrypt/live/EXAMPLE.com/fullchain.pem;
        ssl_certificate_key /etc/letsencrypt/live/EXAMPLE.com/privkey.pem;

       root /var/www/my_website;
       index index.php index.html index.htm;

       location / {
              try_files $uri $uri/ /index.php;
       }

       error_page 500 502 503 504 /50x.html;
       location = /50x.html {
              root /usr/share/nginx/html;
       }

       # pass the PHP scripts to FastCGI server listening on the php-fpm socket
       location ~ \.php$ {
              try_files $uri =404;
              fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
              fastcgi_index index.php;
              fastcgi_param HTTP_PROXY "";
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              include fastcgi_params;
       }
}

chown -R www-data:www-data /var/www/wallabag/data/
chown -R www-data:www-data /var/www/wallabag/var
#If you want to use pdo_sqlite to store your data, please put %kernel.root_dir%/../data/db/wallabag.sqlite for the database_path parameter during 

以上是关于sh Scaleway Letsencrypt LEMP的主要内容,如果未能解决你的问题,请参考以下文章

sh 使用没有root的acme.sh设置LetsEncrypt

sh 我的Automated LetsEncrypt更新程序的第一次修订为ZNC和朋友使用letsencrypt工具

sh 用于通过letsencrypt的docker镜像更新docker nginx代理中的letsencrypt证书的模板

sh softethervpn_letsencrypt_cert_autoupdate.sh

sh #httpd #ssl #letsencrypt

sh LetsEncrypt部署到防火墙