我已经尝试了一切可能的方法让旧的wordpress网站在digitalocean上运行,但无法成功。下面是nginx.config文件,当我打开当前的DigitalOcean IP地址,获取空白页面并在nginx / error / log index.php中获取错误
2016/02/22 06:59:35 [错误] 2282#0:* 3 open()“/ var / www / html / index.php”失败(2:没有这样的文件或目录),客户端: 106.51.28.40,server:stockbucks.in,request:“GET /index.php HTTP / 1.1”,host:“162.243.110.96”,referrer:“http://162.243.110.96/”
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm;
server_name stockbucks.in;
location / {
#try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php;
}
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
location ~* ^.+.(css|js|jpeg|jpg|gif|png|ico|xml) {
access_log off;
expires 30d;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include /etc/nginx/fastcgi_params;
}