youland 发表于 2020-5-1 13:14

在树莓派上安装wordpress

一,安装好树莓派的web服务器
教程:https://yuln.com/thread-49-1-1.html

二,下载wordpress网站程序到树莓派
wget https://wordpress.org/latest.zip

wget https://github.com/WordPress/WordPress/archive/5.4.zip


三,配置nginx

server {
      listen 80;

      server_name abcd.com;
      root /var/www/abcd.com;
      index index.php index.html index.htm default.html;

      location / {
                try_files $uri $uri/ =404;
      }

      # pass the PHP scripts to FastCGI server
      location ~ \.php$ {
                include snippets/fastcgi-php.conf;
                fastcgi_pass unix:/run/php/php7.3-fpm.sock;
      }

      # optimize static file serving
      location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ {
                access_log /var/log/nginx/abcd.com.access.log;
                log_not_found off;
                expires 30d;
      }

      # deny access to .htaccess files, should an Apache document root conflict with nginx
      location ~ /\.ht {
                deny all;
      }
}

页: [1]
查看完整版本: 在树莓派上安装wordpress