Need Help Configuring Nginx to run WordPress 2.5
-
I run WordPress 2.5 under Apache 2.2 on a RedHat 5 ES server with no
problems, and use Nginx to serve images, but I can’t seem to get the
right configuration to run WordPress under Nginx 0.6.29. I have a script that launches /usr/bin/spawn-fcgi on localhost IP 127.0.0.1 using port 7741, and runs the process as php-cgi.Once I switch over WordPress to Nginx I can view and interact with the
Wordpress control panel, which means PHP is working fine, but I can’t
view the web site home page, or any articles. I get a grey blank page,
not even a 404 error. I am unable to figure this out without help. I do not use wp-cache, supercache, or any caching plugins. I do use XCache to pre-compile php. My configuration is below.server {
listen my-ip-address:80;
server_name https://www.mydomain.com mydomain.com;
index index.php;
root /var/www/mydomain;
location ~ .php$ {
include /usr/local/nginx/conf/fcgi.conf;
fastcgi_pass 127.0.0.1:7741;
fastcgi_index /index.php;
}
if (!-e $request_filename) {
rewrite ^(.+)$ /index.php?q=$1 last;
}
}The fcgi.conf file contains:
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_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with –enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;
- The topic ‘Need Help Configuring Nginx to run WordPress 2.5’ is closed to new replies.