Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

deansatch's avatar

Homestead apache gives 500 error when setting php_value

Just got a brand new macbook, transferred all my projects over and installed fresh homestead, vbox, vagrant etc...

I have php_value in my htaccess file for a site which worked ok on my previous mac but throws the internal server error on my new one. If I delete those lines all works.

Any idea what I'm missing? I didn't have to do any particular changes on my old mac to get that working.

btw - I use homestead on per project basis so ideally I don't want to have to ssh into every new vagrant server to mess with modules...hoping more for a global solution

0 likes
4 replies
salmon's avatar

Hey @deansatch have you tried to look at the apache error log to see if you can see what the error is?

Not sure about homestead, but I would assume once you go into your /var/log file you should see your error logs in there.

tail -n100 /var/log/error.log 
deansatch's avatar

Config variable ${APACHE_RUN_DIR} is not defined apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

deansatch's avatar

Anyone any ideas? I've wasted a full day on this now :(

Still got about 20 more VMs to set up and don't want to keep replicating the issue

salmon's avatar

I found this link

Can you confirm you can see /etc/apache2/envvars

If it exist, you can confirm the dir for APACHE_RUN_DIR and try to run source /etc/apache2/envvars

Please or to participate in this conversation.