我刚买了一台新服务器,想尝试其他一些东西.像Nginx而不是Apache.
所以,安装了Nginx,得到了欢迎页面,安装了PHP5-fpm并下载了一个wordpress试试看.
但是,当我试图去地址时,我仍然得到403 Forbidden …
这是conf文件:
server {
listen 80;
server_name localhost;
access_log /var/log/Nginx/axiol.access.log;
error_log /var/log/Nginx/axiol.error.log error;
root /usr/share/Nginx/axiol;
location ~ .PHP${
fastcgi_split_path_info ^(.+\.PHP)(.*)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.PHP;
fastcgi_param SCRIPT_FILENAME /usr/share/Nginx/axiol$fastcgi_script_name;
include fastcgi_params;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;
}
rewrite /wp-admin$$scheme://$host$uri/ permanent;
try_files $uri $uri/ /index.PHP?$args;
}
我已经检查了axiol文件夹的chmod.
任何的想法 ?
最佳答案
原文链接:https://www.f2er.com/nginx/435285.html