OsCommerce

osCommerce example configuration for 0.8.x (maybe 0.7.x too?)
server { server_name www.domain.com; server_name_in_redirect off;

root /var/www/www.domain.com/catalog; access_log /var/www/www.domain.com/logs/access.log; error_log /var/www/www.domain.com/logs/error.log;

# expires max on static content location / { expires max; }

# Inaccessible locations location ~ ^/includes/.*\.php$ { return 403; } location ~ ^/admin/includes/.*\.php$ { return 403; } location ^~ /admin/backups { return 403; } location ^~ /download { return 403; }

# osCommerce rewrites location ~ -p-(?[0-9]+)\.html$ { rewrite ^ /product_info.php?products_id=$id; } location ~ -c-(?[0-9_]+)\.html$ { rewrite ^ /index.php?cPath=$id; } location ~ -m-(?[0-9]+)\.html$ { rewrite ^ /index.php?manufacturers_id=$id; } location ~ -pi-(?[0-9]+)\.html$ { rewrite ^ /popup_image.php?pID=$id; } location ~ -pr-(?[0-9]+)\.html$ { rewrite ^ /product_reviews.php?products_id=$id; } location ~ -pri-(?[0-9]+)\.html$ { rewrite ^ /product_reviews_info.php?products_id=$id; }

# Articles contribution location ~ -t-(?[0-9_]+)\.html$ { rewrite ^ /articles.php?tPath=$id; } location ~ -a-(?[0-9]+)\.html$ { rewrite ^ /article_info.php?articles_id=$id; }

# Information pages location ~ -i-(?[0-9]+)\.html$ { rewrite ^ /information.php?info_id=$id; }

# Links contribution location ~ -links-(?[0-9_]+)\.html$ { rewrite ^ /links.php?lPath=$id; }

# Newsdesk contribution location ~ -n-(?[0-9]+)\.html$ { rewrite ^ /newsdesk_info.php?newsdesk_id=$id; } location ~ -nc-(?[0-9]+)\.html$ { rewrite ^ /newsdesk_index.php?newsPath=$id; } location ~ -nri-(?[0-9]+)\.html$ { rewrite ^ /newsdesk_reviews_info.php?newsdesk_id=$id; } location ~ -nra-(?[0-9]+)\.html$ { rewrite ^ /newsdesk_reviews_article.php?newsdesk_id=$id; }

# Pass to php location ~ \.php$ { if (!-f $request_filename) { return 404; } include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param REDIRECT_STATUS 200; fastcgi_pass 127.0.0.1:9000; } }