mirror of
				https://github.com/linuxserver/docker-swag.git
				synced 2025-10-31 13:07:44 +09:00 
			
		
		
		
	Fix index.php being downloaded on 404
Signed-off-by: Eric Nemchik <eric@nemchik.com>
This commit is contained in:
		| @@ -153,6 +153,7 @@ app_setup_block: | | |||||||
|  |  | ||||||
| # changelog | # changelog | ||||||
| changelogs: | changelogs: | ||||||
|  |   - { date: "27.04.23:", desc: "[Existing users should update:](https://github.com/linuxserver/docker-swag/blob/master/README.md#updating-configs) site-confs/default.conf - Fix index.php being downloaded on 404." } | ||||||
|   - { date: "01.10.23:", desc: "Fix \"unrecognized arguments\" issue in DirectAdmin DNS plugin." } |   - { date: "01.10.23:", desc: "Fix \"unrecognized arguments\" issue in DirectAdmin DNS plugin." } | ||||||
|   - { date: "28.08.23:", desc: "Add Namecheap DNS plugin." } |   - { date: "28.08.23:", desc: "Add Namecheap DNS plugin." } | ||||||
|   - { date: "12.08.23:", desc: "Add FreeDNS plugin. Detect certbot DNS authenticators using CLI." } |   - { date: "12.08.23:", desc: "Add FreeDNS plugin. Detect certbot DNS authenticators using CLI." } | ||||||
|   | |||||||
| @@ -1,4 +1,4 @@ | |||||||
| ## Version 2023/06/05 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample | ## Version 2023/11/27 - Changelog: https://github.com/linuxserver/docker-swag/commits/master/root/defaults/nginx/site-confs/default.conf.sample | ||||||
|  |  | ||||||
| # redirect all traffic to https | # redirect all traffic to https | ||||||
| server { | server { | ||||||
| @@ -48,7 +48,7 @@ server { | |||||||
|         # enable for Authentik (requires authentik-server.conf in the server block) |         # enable for Authentik (requires authentik-server.conf in the server block) | ||||||
|         #include /config/nginx/authentik-location.conf; |         #include /config/nginx/authentik-location.conf; | ||||||
|  |  | ||||||
|         try_files $uri $uri/ /index.html /index.php$is_args$args =404; |         try_files $uri $uri/ /index.html /index.php$is_args$args; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     location ~ ^(.+\.php)(.*)$ { |     location ~ ^(.+\.php)(.*)$ { | ||||||
| @@ -65,6 +65,7 @@ server { | |||||||
|         # enable for Authentik (requires authentik-server.conf in the server block) |         # enable for Authentik (requires authentik-server.conf in the server block) | ||||||
|         #include /config/nginx/authentik-location.conf; |         #include /config/nginx/authentik-location.conf; | ||||||
|  |  | ||||||
|  |         try_files $fastcgi_script_name =404; | ||||||
|         fastcgi_split_path_info ^(.+\.php)(.*)$; |         fastcgi_split_path_info ^(.+\.php)(.*)$; | ||||||
|         fastcgi_pass 127.0.0.1:9000; |         fastcgi_pass 127.0.0.1:9000; | ||||||
|         fastcgi_index index.php; |         fastcgi_index index.php; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user