502 bad gateway
Closed this issue · 3 comments
When i load that url from the host box i get an nginx screen stating 502 bad gateway
.
Afer i successfully ssh'd into the vagrant box (homestead) i ran the mentioned shell command. It appeard all is well. When looking i do see phpmyadmin in the nginx sites-available, i did add the url to the vhost 127.0.0.1 phpmyadmin.app
. i also tried restarting nginx and php-fpm.
Not sure where to look from here, not knowing much about vagrant yet, its new to me still. Do i need to check some config file somewhere?
I got it to work using this method instead https://stackoverflow.com/questions/23788096/how-to-setup-phpmyadmin-on-a-laravel-homestead-box#answer-36640591
In /etc/nginx/sites-enabled/phpmyadmin.test change:
fastcgi_pass unix:/var/run/php/php-fpm.sock;
to:
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
An alternate solution would be to modify the parameters passed to the serve-laravel.sh script to include the PHP version.
Homestead 6+ support multiple PHP versions ("7.1", "7.2" and "7.3") now.
I've fixed the problem by adding (php: "7.2") in the Homestead.yaml like this
- map: phpmyadmin.test
to: /home/vagrant/code/phpmyadmin
php: "7.2"