FAQ

Page Discussion History

Difference between revisions of "Magento"

(Without the args parameter filtering, search or other items in magento that require additional parameters wont work. Changed ports on PHP to 9000 as that will be more familiar to viewers.)
 
(Provided configuration was dangerous and exposed sensitive information. Referrer people to the best source for updated information instead.)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
[http://www.magentocommerce.com/ Magento] is becoming a very popular web based commerce system.
+
Magento using nginx is documented in detail on the [https://www.magentocommerce.com/wiki/1_-_installation_and_configuration/configuring_nginx_for_magento Magento wiki]
 
+
This config currently seems to work for the <1.4 versions
+
 
+
<geshi lang="nginx">
+
server {
+
  server_name example.com;
+
  root /var/www/vhost/example.com/htdocs;
+
  access_log /var/log/nginx/example.com.access.log main;
+
  index index.php;
+
 
+
  location / {
+
    try_files $uri $uri/ /index.php?$args;
+
  }
+
 
+
  # set a nice expire for assets
+
  location ~* "^.+\.(jpe?g|gif|css|png|js|ico|pdf|zip|tar|t?gz|mp3|wav|swf)$" {
+
    expires    max;
+
    add_header Cache-Control public;
+
  }
+
 
+
  # the downloader has its own index.php that needs to be used
+
  location ~* ^(/downloader|/js|/404|/report)(.*) {
+
    include fastcgi_params;
+
    fastcgi_index index.php;
+
    fastcgi_param  SCRIPT_FILENAME  $document_root$1/index.php$1;
+
    fastcgi_read_timeout 600;
+
    fastcgi_pass  127.0.0.1:9000;
+
  }
+
 
+
  location ~* \.php {
+
    include fastcgi_params;
+
    fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
+
    fastcgi_read_timeout 600;
+
    fastcgi_pass  127.0.0.1:9000;
+
  }
+
 
+
}
+
</geshi>
+

Latest revision as of 07:41, 19 March 2014

Magento using nginx is documented in detail on the Magento wiki