Apache2: ‘AH01630: client denied by server configuration’

If you are using Apache 2.4 You have to check allow and deny rules Check out http://httpd.apache.org/docs/2.4/upgrading.html#access In 2.2, access control based on client hostname, IP address, and other characteristics of client requests was done using the directives Order, Allow, Deny, and Satisfy. In 2.4, such access control is done in the same way as other … Read more

PHP $_SERVER[‘HTTP_HOST’] vs. $_SERVER[‘SERVER_NAME’], am I understanding the man pages correctly?

That’s probably everyone’s first thought. But it’s a little bit more difficult. See Chris Shiflett’s article SERVER_NAME Versus HTTP_HOST. It seems that there is no silver bullet. Only when you force Apache to use the canonical name you will always get the right server name with SERVER_NAME. So you either go with that or you check the host name against a white … Read more

Localhost is not working

If you have defined Virtual Hosts, and thats a very good idea, then you need to define the vhosts name in the HOSTS file. For example, the hosts file: Otherwise windows has no way of knowing where to look for them. Another possibility for localhost not working is a corrupted HOSTS file. Try deleting it … Read more

Whats the point of running Laravel with the command ‘php artisan serve’?

The serve command is just a shortcut for the PHP Built-in Webserver, something PHP has out of the box, so the point of using it is to start testing your application as fast as you could, you just need to install PHP, Composer and your application is up (if you don’t need anything else, of course). But if … Read more

How to run php files on my computer

You have to run a web server (e.g. Apache) and browse to your localhost, mostly likely on port 80. What you really ought to do is install an all-in-one package like XAMPP, it bundles Apache, MySQL PHP, and Perl (if you were so inclined) as well as a few other tools that work with Apache and … Read more