mirror of
				https://github.com/hoellen/dockerfiles.git
				synced 2025-10-31 14:26:57 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			100 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			Nginx Configuration File
		
	
	
	
	
	
			
		
		
	
	
			100 lines
		
	
	
		
			2.5 KiB
		
	
	
	
		
			Nginx Configuration File
		
	
	
	
	
	
| user piwik;
 | |
| worker_processes auto;
 | |
| pid /var/run/nginx.pid;
 | |
| daemon off;
 | |
| 
 | |
| events {
 | |
|     worker_connections 1024; 
 | |
|     use epoll;
 | |
| }
 | |
| 
 | |
| http {
 | |
|     include /etc/nginx/mime.types;
 | |
|     default_type  application/octet-stream;
 | |
| 
 | |
|     access_log off;
 | |
|     error_log /var/log/nginx/error.log error;
 | |
| 
 | |
|     fastcgi_temp_path /tmp 1 2;   
 | |
|  
 | |
|     sendfile on;
 | |
|     keepalive_timeout 15;
 | |
|     keepalive_disable msie6;
 | |
|     keepalive_requests 100;
 | |
|     tcp_nopush on;
 | |
|     tcp_nodelay on;
 | |
|     server_tokens off;
 | |
|     
 | |
|     gzip on;
 | |
|     gzip_comp_level 5;
 | |
|     gzip_min_length 512;
 | |
|     gzip_buffers 4 8k;
 | |
|     gzip_proxied any;
 | |
|     gzip_vary on;
 | |
|     gzip_disable "msie6";
 | |
|     gzip_types
 | |
|         text/css
 | |
|         text/javascript
 | |
|         text/xml
 | |
|         text/plain
 | |
|         text/x-component
 | |
|         application/javascript
 | |
|         application/x-javascript
 | |
|         application/json
 | |
|         application/xml
 | |
|         application/rss+xml
 | |
|         application/vnd.ms-fontobject
 | |
|         font/truetype
 | |
|         font/opentype
 | |
|         image/svg+xml;
 | |
| 
 | |
|     server {
 | |
|     	listen 80;
 | |
|     	root /piwik;
 | |
|     	index index.php index.html;
 | |
| 
 | |
|     	location ~* \.(?:bat|git|ini|sh|svn[^.]*|txt|tpl|xml)$ {
 | |
|         	return 404;
 | |
|     	}
 | |
| 
 | |
|     	location ~* \.(jpg|jpeg|gif|css|png|js|map|woff|woff2|ttf|svg|eot)$ {
 | |
|     		expires 30d;
 | |
|     		access_log off;
 | |
| 	}
 | |
| 
 | |
|     	location = /favicon.ico {
 | |
|         	try_files /favicon.ico =204;
 | |
|     	}
 | |
| 
 | |
|    	location ~* ^/(?:README|LICENSE[^.]*|LEGALNOTICE)(?:\.txt)*$ {
 | |
|         	return 404;
 | |
|     	}
 | |
| 
 | |
|         location ~ ^/(vendor|config|tmp|libs|misc) {            
 | |
|             deny all;                                                 
 | |
|             return 404;                                                      
 | |
|         }                                                                    
 | |
|                                                                              
 | |
|         location ~* /(.*)\.(?:markdown|md|twig|yaml|yml|ht|htaccess|ini)$ {
 | |
|             deny all;                                                        
 | |
|         }                                                                    
 | |
|                                                                              
 | |
|         location ~ /\. {                                                     
 | |
|             deny all;                                                        
 | |
|         }
 | |
| 
 | |
|     	location / {
 | |
|         	try_files $uri /index.php;
 | |
|     	}
 | |
| 
 | |
| 	location ~ \.php$ {
 | |
|     		fastcgi_index index.php;
 | |
|     		fastcgi_pass unix:/var/run/php-fpm.sock;
 | |
|     		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
 | |
|     		include /etc/nginx/fastcgi_params;
 | |
| 	}
 | |
| 
 | |
|     }
 | |
| 
 | |
| }
 |