nginx配置如下
server {
listen 80 ;
server_name roamer.cc;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/roamer.cc/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/roamer.cc/privkey.pem;
root /home/www/roamercc/;
index index.html index.htm index.php;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php$1 last;
}
location ~ .*.php(/.*)*$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
access_log /var/log/nginx/roamercc.access.log combined;
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…