How to change public folder to public_html in laravel 5

Quite easy to find this with a simple search. See: https://laracasts.com/discuss/channels/general-discussion/where-do-you-set-public-directory-laravel-5 In your index.php add the following 3 lines. /* |————————————————————————– | Turn On The Lights |————————————————————————– | | We need to illuminate PHP development, so let us turn on the lights. | This bootstraps the framework and gets it ready for use, then it … Read more

Need to allow encoded slashes on Apache

I kept coming across this post for another issue. Let me just explain real quick. I had the same style URL and was also trying to proxy it. Example: Proxy requests from /example/ to another server. /example/http:%2F%2Fwww.someurl.com/ Issue 1: Apache believes that’s an invalid url Solution: AllowEncodedSlashes On in httpd.conf Issue 2: Apache decodes the … Read more

Correct owner/group/permissions for Apache 2 site files/folders under Mac OS X?

This is the most restrictive and safest way I’ve found, as explained here for hypothetical ~/my/web/root/ directory for your web content: For each parent directory leading to your web root (e.g. ~/my, ~/my/web, ~/my/web/root): chmod go-rwx DIR (nobody other than owner can access content) chmod go+x DIR (to allow “users” including _www to “enter” the … Read more

Make .git directory web inaccessible

Put this in an .htaccess file at the root of your web server: RedirectMatch 404 /\.git This solution is robust and secure: it works for all .git directories in your site, even if there are more than one, also hides other Git files like .gitignore and .gitmodules works even for newly-added .git directories, and doesn’t … Read more