Nginx + WordPress的permisions设置

我正在用nginx支持的wordpress安装来试验一些麻烦。 该架构在亚马逊举行,是以下内容:

EC2 Nginx 1.2.4 + php-fpm服务器EC2 NFS服务器RDS mysql

nginx从/ mnt / sharedpool / blog的nfs分区读取站点文件

fstabconfiguration是:

compute-1.amazonaws.com:/mnt/sharedpool/mnt/publicpool nfs rw,relatime 0 0

nfs服务器/ etc / exportsconfiguration:

/ mnt / sharedpool ec2-xx-xx-xxx-xxx.compute-1.amazonaws.com(rw,sync)

nginx用户和组设置为www-data:www-data,站点的根指令设置为/ mnt / sharedpool / blog

我下载了wordpress的最新版本,并成功安装了它。 事情是,login后,我得到403禁止..我认为应该是一个WordPress的设置,因为我可以在同一个目录中创build和调用一个phpinfo()。

更新:

Nginx服务器configuration:

用户www-data www-data; worker_processes 1; pid /var/run/nginx.pid;

事件{worker_connections 768; #multi_accept on; }

http {

## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 65; types_hash_max_size 2048; # server_tokens off; # server_names_hash_bucket_size 64; # server_name_in_redirect off; include /etc/nginx/mime.types; default_type application/octet-stream; ## # Logging Settings ## access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; # gzip_vary on; # gzip_proxied any; # gzip_comp_level 6; # gzip_buffers 16 8k; # gzip_http_version 1.1; # gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript; ## # nginx-naxsi config ## # Uncomment it if you installed nginx-naxsi ## #include /etc/nginx/naxsi_core.rules; ## # nginx-passenger config ## # Uncomment it if you installed nginx-passenger ## #passenger_root /usr; #passenger_ruby /usr/bin/ruby; ## # Virtual Host Configs ## include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; 

}

Nginx的网站configuration:

服务器{听80; #listen [::]:80 default_server ipv6only = on; ##监听ipv6

  root /mnt/sharedpool/blog; index index.html index.htm; # Make site accessible from http://localhost/ server_name localhost; location / { # First attempt to serve request as file, then # as directory, then fall back to displaying a 404. try_files $uri $uri/ /index.php; # Uncomment to enable naxsi on this location # include /etc/nginx/naxsi.rules } location /doc/ { alias /usr/share/doc/; #autoindex on; # allow 127.0.0.1; # allow ::1; # deny all; } #error_page 404 /404.html; # redirect server error pages to the static page /50x.html # #error_page 500 502 503 504 /50x.html; #location = /50x.html { # root /usr/share/nginx/www; #} # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; include fastcgi_params; } # deny access to .htaccess files, if Apache's document root # concurs with nginx's one location ~ /\.ht { deny all; } 

}

提前致谢!

  • IIS子文件夹中的另一个网站
  • 如何在同一台服务器上制作当前正在运行的wordpress网站的镜像?
  • ./kernelupdates 100%的CPU使用率
  • 周期性的MySQLlocking,当Wordpress负荷很重
  • 如何将wordpress媒体文件存储到Google Cloud Storage存储桶中?
  • MySQL用户需要什么特权?
  • One Solution collect form web for “Nginx + WordPress的permisions设置”

    它看起来像nginx是不是很确定什么索引文件加载为您的网站。 由于这是一个基于PHP的网站(WordPress),这应该是index.php 。 但是你的index指令读取:

      index index.html index.htm; 

    我会改变这个:

      index index.php; 
    服务器问题集锦,包括 Linux(Ubuntu, Centos,Debian等)和Windows Server服务器.