Can't make Laravel 4 to work on localhost
Production way, moderate complexity for people not familiar with Unix, but more secure:
- Go in super user mode (sudo -s or su).
- Create group
web
(groupadd web
) - Add you main user to group
web
(suppose your user iscool_user
, so runusermod -a -G web cool_user
) - Add php-fpm or web server user (if php is used as a SAPI module) to
web
group (for example, on CentOS php-fpm utilizeapache
user name, so in most cases this will work:usermod -a -G web apache
) - Change your project root directory group owner to
web
recursively (chgrp -R web /path/to/project/root/
) - Grant recursively write permission for group (
chmod -R g+w /path/to/project/root/
- Optionally To allow all newly created by
apache
(or some other) user files and folders be accessible from your user, make them receive group ownership same as their parent folder by setting groupid bit recursively on your project root directory (chmod -R g+s /path/to/project/root/
).
Voila!.
Fast and dirty way, for those who doesn't care about security and want make it works at any cost, not secure:
- Go in super user mode (sudo -s or su).
- Grant recursively full permission (read, write, execute) for all users (
chmod -R o=rwx /path/to/project/root/