Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am experimenting a little with Nginx, and using XSLT to transform RSS-feeds from external sites to a unified format.

I first made a working XSLT-stylesheet and applied it to the RSS-feed from bt-chat.com, which worked fine, and gave me exactly what I wanted. I then set up a location for a feed from showrss.karmorra.info, with identical configuration, but for reasons I can't understand, the XSLT-stylesheet just isn't applied. Instead, the XML goes straight through, unchanged.

I can't find any reason for why this should work for one external site and not the other, but I also have trouble understanding how identical configurations could give such different results.

Any tips or pointers anyone can give me would be appreciated. The only difference I can see on the external sites, apart from the XML actually being different, is that one of them is returning a "Last-Modified" header, but I can't for the life of me see how that should affect the XSLT-stylesheet being applied or not.

My Nginx-conf:

user nginx nginx;
worker_processes 1;

events {
    worker_connections 1024;
    use epoll;
}

http {
    include /etc/nginx/mime.types;
    default_type application/octet-stream;

    log_format main
            '$remote_addr - $remote_user [$time_local] '
            '"$request" $status $bytes_sent '
            '"$http_referer" "$http_user_agent" '
            '"$gzip_ratio"';

    access_log /var/log/nginx/access_log main;
    error_log /var/log/nginx/error_log debug;

    index index.html;

    server {
            listen 81;
            server_name theano;
            server_name localhost;

            access_log /var/log/nginx/ibidem.homeip.net-access_log main;
            error_log /var/log/nginx/ibidem.homeip.net-error_log debug;

            root /var/www/ibidem.homeip.net/htdocs;

            location /feed/btchat/ {
                    proxy_pass http://rss.bt-chat.com/?group=2;
                    xslt_stylesheet /etc/nginx/nginx_feed_btchat.xslt
                            showname=$arg_showname;
            }
            location /feed/karmorra/ {
                    proxy_pass http://showrss.karmorra.info/feeds/all.rss;
                    xslt_stylesheet /etc/nginx/nginx_feed_karmorra.xslt
                            showname=$arg_showname;
            }
    }
}
share|improve this question
    
Just checking: have you confirmed that the XSLT works properly on both feeds? That is, that this is an Nginx problem and not an issue with the XSLT not matching on both feeds? –  pjmorse Apr 21 '11 at 16:57
    
The thing is that I can't get it to run at all on the second feed. I have tried changing the XSLT to a dead simple template that just prints out Hello World regardless of input, and nothing happens. –  Epcylon Apr 21 '11 at 19:19
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.