File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
docker/web/nginx/default.d Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
- # https://laravel.com/docs/10 .x/deployment
1
+ # https://laravel.com/docs/11 .x/deployment#nginx
2
2
#
3
3
4
4
add_header X-Frame-Options "SAMEORIGIN";
@@ -17,14 +17,18 @@ location = /robots.txt { access_log off; log_not_found off; }
17
17
18
18
error_page 404 /index.php;
19
19
20
- location ~ \.php$ {
20
+ location ~ ^/index \.php(/|$) {
21
21
# NOTE: ../default.d/03.php.conf に設定を移譲しているため。
22
22
# fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
23
23
fastcgi_pass php-fpm;
24
24
25
25
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
26
26
include fastcgi_params;
27
27
28
+ # NOTE: PHPがデフォルトで返すバージョン情報のヘッダーを非表示にする
29
+ # 基本的には php.ini の expose_php = Off で無効化されているが、念のため Nginx でも非表示にしておく
30
+ fastcgi_hide_header X-Powered-By;
31
+
28
32
# NOTE: デフォルトから追加した設定
29
33
# php-fpm動作時のバッファ量
30
34
fastcgi_buffer_size 16k;
You can’t perform that action at this time.
0 commit comments