wordpress rewrite nginx

Anonymous Coward magasesti at gmail.com
Tue Feb 13 18:43:22 MSK 2007

Same... it just loads the next and the uploaded pictures from posts... all
bulky with no design

Now my config looks like:

        server {
                listen          my.ip;
                server_name     sub.domain.tld;
                root    /var/www/localhost/htdocs/sub.domain.tld;

                access_log      /var/log/nginx/sub.domain.tld.access_log
                error_log       /var/log/nginx/sub.domain.tld.error_log;

                rewrite ^(.*)?/?files/(.*) /wp-content/blogs.php?file=$2;

        location / {
                root    /var/www/localhost/htdocs/sub.domain.tld;
                deny all;

                if (!-e $request_filename) {
                rewrite ^([_0-9a-zA-Z-]+)?(/wp-.*) $2 last;
                rewrite ^([_0-9a-zA-Z-]+)?(/.*\.php)$ $2 last;
                rewrite ^ /index.php last;
        location ~ .php$ {
                include /etc/nginx/fastcgi_params;
                fastcgi_index  index.php;

           # where the php files to pass to the listener.
                fastcgi_param  SCRIPT_FILENAME

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20070213/847ea5a5/attachment.html>

More information about the nginx mailing list