Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Laravel Homestead XDebug Nginx and Composer config changes

Laravel Homestead XDebug Nginx and Composer config changes

/etc/nginx/fastcgi_params

Update nginx config to support a longer timeout to prevent it dropping the connection when trying to debug in PHP Storm

fastcgi_read_timeout 600; # Set fairly high for debugging

XDebug config

Add the following to the /etc/php5/fpm/conf.d/20-xdebug.ini file to enable PHPStorm debugging

xdebug.cli_color=1
xdebug.show_local_vars=1
xdebug.remote_enable=1
xdebug.remote_connect_back=1
xdebug.remote_port="9000"
xdebug.idekey=phpstorm
xdebug.scream = 0
xdebug.max_nesting_level=300

Add github auth to composer, so it can fetch everything easily

Detailed info here: https://coderwall.com/p/kz4egw

But really you just need to do this...

composer config github-oauth.github.com YOUR-TOKEN-HASH-GOES-HERE

Add aliases to .bash_aliases

alias art='php artisan'
alias autoload='composer dump-autoload'
alias xoff='sudo phpdismod -s cli xdebug-cli; sudo /etc/init.d/php7.0-fpm restart'
alias xon='sudo phpenmod -s cli xdebug-cli; sudo /etc/init.d/php7.0-fpm restart'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment