Last Updated: February 25, 2016
·
1.575K
· alvaropg1980

Enable PHP development in Fedora 18

Install Apache and PHP

$ sudo yum install httpd php php-common php-cli
$ sudo service httpd start

Create your project directory

$ cd ~/webdevel
$ mkdir project1
$ mkdir project1/logs # a write directory example
$ sudo setfacl -R -m u:apache:rwx -m u:`whoami`:rwx project1/logs
$ sudo setfacl -m u:apache:x /home/`whoami`/webdevel
$ sudo ln -s project1 /var/www/html

Enable SELinux policies

$ sudo setsebool -P httpd_enable_homedirs true
$ sudo setsebool -P httpd_read_user_content true
$ sudo setsebool allow_httpd_anon_write true
$ sudo chcon -t chcon -t public_content_rw_t project1/logs