Config Problem for Wordpress 2.5
Todd HG
lists at ruby-forum.com
Sun Apr 13 01:25:13 MSD 2008
I am currently using Nginx to serve images only, but I have written a
script to launch the Nginx process, and php-cgi processes needed to run
Wordpress. I don't seem to have the cofiguration correctly written, and
I'm not sure where I am making my error, so I could use some help. I
also don't use the wp-cache, or Supercache plugins. I am running a
RedHat 5 Enterprise Server. Here is my configuration:
server {
listen my_ip_address:80;
server_name www.mydomain.com mydomain.com;
error_page 404 http://www.mydomain.com/e404.php;
location / {
root /var/www/mydomain;
index index.php index.html index.htm;
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?q=$1 last;
}
valid_referers none blocked images.google.com;
if ($invalid_referer) {
# return 404;
rewrite ^(.*)$ http://www.mydomain.com/;
}
deny blocked_ip_address;
allow all;
}
location ~ .php$ {
fastcgi_pass localhost:9999;
fastcgi_index index.php;
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 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;
fastcgi_param SCRIPT_FILENAME
/var/www/mydomain$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
}
}
--
Posted via http://www.ruby-forum.com/.
More information about the nginx
mailing list