Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- server {
- listen 80;
- server_name ~^(?:www\.)?(?<domain>.+)$;
- root /home/www/$domain;
- index index.php;
- location / {
- try_files $uri $uri/ /index.php?q=$uri&$args;
- }
- location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ {
- return 403;
- error_page 403 /403_error.html;
- }
- location ~ /\. {
- deny all;
- access_log off;
- log_not_found off;
- }
- location ~* \.(jpg|jpeg|gif|png|ico|css|pdf|ppt|txt|bmp|rtf|js|gz)$ {
- root /home/www/$domain;
- access_log off;
- expires 30d;
- gzip_static on;
- }
- location ~ \.php$ {
- fastcgi_pass unix:/var/tmp/joom.sock;
- fastcgi_index index.php;
- client_max_body_size 30m;
- client_body_buffer_size 128k;
- fastcgi_cache_min_uses 1;
- fastcgi_cache_use_stale error timeout invalid_header http_500;
- fastcgi_cache_valid 200 302 304 10m;
- fastcgi_cache_valid 301 1h;
- fastcgi_cache_valid any 3m;
- include /etc/nginx/fastcgi_params;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment