43 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			43 lines
		
	
	
	
		
			1.2 KiB
		
	
	
	
		
			Text
		
	
	
	
	
	
| # Upstream to abstract backend connection(s) for php
 | |
| server {
 | |
|     listen 443      ssl http2;
 | |
|     listen [::]:443 ssl http2;
 | |
| 
 | |
|     server_name ${server_name};
 | |
|     root ${root};
 | |
|     index index.php;
 | |
| 
 | |
|     ssl_certificate /var/lib/dehydrated/certs/${server_name}/fullchain.pem;
 | |
|     ssl_certificate_key /var/lib/dehydrated/certs/${server_name}/privkey.pem;
 | |
| 
 | |
|     location = /favicon.ico {
 | |
|         log_not_found off;
 | |
|         access_log off;
 | |
|     }
 | |
| 
 | |
|     location = /robots.txt {
 | |
|         allow all;
 | |
|         log_not_found off;
 | |
|         access_log off;
 | |
|     }
 | |
| 
 | |
|     location / {
 | |
|         # This is cool because no php is touched for static content.
 | |
|         # include the "?$args" part so non-default permalinks doesn't break when using query string
 | |
|         try_files $uri $uri/ /index.php?$args;
 | |
|     }
 | |
| 
 | |
|     location ~ \.php$ {
 | |
|         # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
 | |
|         include params/fastcgi;
 | |
|         fastcgi_intercept_errors on;
 | |
|         fastcgi_pass php-handler;
 | |
|         # The following parameter can be also included in fastcgi_params file
 | |
|         fastcgi_param  SCRIPT_FILENAME $document_root$fastcgi_script_name;
 | |
|     }
 | |
| 
 | |
|     location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
 | |
|         expires max;
 | |
|         log_not_found off;
 | |
|     }
 | |
| }
 |