dyna sbobkin at gmail.com
Fri Mar 23 19:09:01 MSK 2007

I've been trying to setup clean URLs on a Wordpress 2.1.2 install. I've read
over this thread ( http://thread.gmane.org/gmane.comp.web.nginx.english/637 )
and essentially that is what I have with the exception that I do not run a
WordPress MU install. 

The redirects for posts appear to work, however if I for example go to
/wp-admin/ I will be redirected to index.php with a 404 error, the stylesheet
and images do not load. 

The install can be found at if you want to see the results live.

The domain is still not forwarded until I get a few more things taken care of so
I am using the IP for access for now. 

I've attached the nginx.conf file below any input would be fantastic. Thanks.

---- nginx.conf ----

        server { #domain.com
        listen          80;
        server_name     domain.com www.domain.com *.domain.com;
        access_log      logs/domain.access.log main;

        location / { # default handler
	               index index.html index.htm index.php;
	               root  /var/www/domains/domain.com;
 	# static handler
 	location ~* ^.+\.(jpg|jpeg|gif|png|css|txt|mp3|zip|tpl)$ 
	          root /var/www/domains/domain.com;
                  access_log   off;
                  expires      30d;
 	# wordpress rewrites
	rewrite  ^.*/files/(.*) /wp-content/blogs.php?file=$1;	
 	if (!-e $request_filename) {
	          rewrite ^.+?(/wp-.*)    $1 last;
		  rewrite ^.+?(/.*\.php)$ $1 last;
		  rewrite ^ /index.php       last;
 	# fastcgi passoff
 	location ~ .*\.php$ { 
                            include /etc/nginx/fcgi.conf;      
		       	    fastcgi_index index.php;
	fastcgi_param SCRIPT_FILENAME /var/www/domains/rednine.org$fastcgi_script_name;

               } #domain.com-close

More information about the nginx mailing list