Конфигурационный файл nginx для Joomla
- site.ru
server { listen 80; server_name site.ru www.site.ru; root /path/site.ru/www; access_log /var/log/nginx/site-access.log; error_log /var/log/nginx/site-error.log; index index.php index.html index.htm; rewrite_log on; if ($host != 'site.ru' ) { rewrite ^/(.*)$ http://site.ru/$1 permanent; } charset utf-8; location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ { return 403; error_page 403 /403_error.html; } location / { try_files $uri $uri/ /index.php?$args; } location /index.html { rewrite // permanent; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_buffers 16 16k; fastcgi_buffer_size 32k; fastcgi_param PHP_VALUE "include_path=.:/usr/share/php:/usr/share/pear"; fastcgi_param PHP_ADMIN_VALUE "open_basedir=/path/site.ru"; fastcgi_index index.php; include fastcgi_params; } location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|bmp|txt)$ { access_log off; expires 14d; break; } location ~* \.(ico|pdf|flv)$ { access_log off; expires 1y; break; } location ~ /\.ht { deny all; } }