本文介绍了Laravel Valet原木的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用laravel valet为本地开发环境中的网站提供服务,这很棒.但是,~/.valet/Log的预期位置中只有一个文件:

I'm using laravel valet to serve sites in my local dev env, which is great. However, there's only one file in the expected location of ~/.valet/Log:

➜ ls ~/.valet/Log
nginx-error.log

我已经修改了php-fpm日志设置和nginx日志设置,但是我不确定自己是否使用了正确的配置文件,因为我怀疑valet安装了自己的PHP和nginx版本.

I've tinkered with php-fpm log settings and the nginx log settings, but I'm not sure that I'm even using the right config files, since I suspect that valet installs its own version of PHP and nginx.

任何人都可以告诉我在哪里可以找到代客的php/nginx配置文件,以及要更改哪些特定设置以将PHP错误/日志文件放置在应该写入的位置吗?

Can any one tell me where the php / nginx config files for valet would be found, and what specific settings to change to drop the PHP error / log files where they're supposed to be written?

推荐答案

希望这对您有关nginx配置文件的问题有所帮助.您可以通过在终端中运行cd ~/.config/valet/Nginx来找到站点的nginx配置.要获取代客的基本nginx配置,请使用cd /usr/local/etc/nginx/valet.然后,您应该看到valet.conf,在其中可以更新以下行以将日志文件放置在所需的位置.

Hopefully this helps with your question about the nginx config files. You can find the nginx configuration for your sites by running cd ~/.config/valet/Nginx in your terminal. To get to the base nginx config for valet use cd /usr/local/etc/nginx/valet. You should then see valet.conf, inside you can update the following lines to put the log files where you want them.

access_log "/Users/[user_id]/.config/valet/Log/access.log";
error_log "/Users/[user_id]/.config/valet/Log/nginx-error.log";

对valet.conf文件进行更改后,请确保运行valet restart.

Make sure to run valet restart after you make changes to the valet.conf file.

这篇关于Laravel Valet原木的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-01 18:38