我尝试增加/usr/local/etc/nginx/valet/valet.conf
文件中的超时值:
server {
listen 80 default_server;
root /;
charset utf-8;
client_max_body_size 500M;
client_header_timeout 3000;
client_body_timeout 3000;
location /41c270e4-5535-4daa-b23e-c269744c2f45/ {
internal;
alias /;
try_files $uri $uri/;
}
location / {
rewrite ^ /Users/Me/.composer/vendor/laravel/valet/server.php last;
}
access_log off;
error_log /Users/Me/.valet/Log/nginx-error.log;
error_page 404 /Users/Me/.composer/vendor/laravel/valet/server.php;
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/Users/Me/.valet/valet.sock;
fastcgi_index /Users/Me/.composer/vendor/laravel/valet/server.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME /Users/Me/.composer/vendor/laravel/valet/server.php;
fastcgi_read_timeout 3000;
fastcgi_send_timeout 1200;
fastcgi_connect_timeout 1200;
fastcgi_buffers 32 64k;
fastcgi_buffer_size 128k;
proxy_connect_timeout 3000;
proxy_send_timeout 3000;
proxy_read_timeout 3000;
send_timeout 3000;
}
location ~ /\.ht {
deny all;
}
}
尝试添加request_terminate_timeout = 3000
到 php.ini 并增加以下值:
max_input_time = 900
max_execution_time = 900
这是在 php.ini 文件中显示的php --ini
:
/usr/local/etc/php/7.2/php.ini
我已经重新启动了 php 和 nginx。
我仍然在 30 秒时超时。
我在这里遗漏了什么?
答案1
该问题是由于 Laravel Valet在目录上~/.valet/Nginx/yoursite.conf
执行操作后在其下创建了一个单独的 conf 文件而引起的。valet secure
将超时更改添加到该配置文件,然后重新启动 valet 即可解决问题。