![]() | 1 | initial version |
I found a good tutorial and tested it. Now I'm happy. Hope it's also secure enough.
Hopefully somone else can benefit from this.
I asume you installed this first:
dnf install httpd mariadb mariadb-server php php-cli php-php-gettext php-mbstring php-mcrypt php-mysqlnd php-pear php-curl php-gd php-xml php-bcmath php-zip phpmyadmin
After installing httpd mariadb php and phpmyadmin. Do the following
Allow virtual machines that use fusefs to install properly with SELinux (Don't know if this is really necessary? Can someone clarify?)
sudo setsebool -P virt_use_fusefs 1
Increasing the amount of inotify watchers READ MORE: https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
Create folder where we will store and run our development sites
mkdir ~/Sites
Creating symbolic link from the Apache web directory to your sites folder
sudo ln -s ~/Sites /var/www/html
Tell SELinux that these files/directories are allowed to be modified by Apache
sudo chcon -R unconfined_u:object_r:httpd_sys_rw_content_t:s0 ~/Sites
Change the "User apache" string in the config file to "User (the username of the current user)". For a development machine, it's more convenient to run Apache as the current user to simplify permissions problems
sudo sed -i "s/User apache/User $USERNAME/g" /etc/httpd/conf/httpd.conf
Edit config file www.conf. Seems important to get everything working right.
listen.acl_users = apache,nginx,$USERNAME
sudo nano /etc/php-fpm.d/www.conf
Configure mariadb
sudo systemctl start mariadb.service
sudo mysql_secure_installation
#
#
Add your virtualhostfiles and make the necessary changes to your /etc/hosts file. Enjoy!
If you need connection for your CMS f.e. than allow apache/httpd to connect:
Allow Apache/httpd to connect
sudo setsebool -P httpd_can_network_connect 1
Thanks to the only (good) tutorial I found!