Skip to content

Latest commit

 

History

History
44 lines (34 loc) · 1.27 KB

lamp-server-installation-procedure.md

File metadata and controls

44 lines (34 loc) · 1.27 KB

In case of minimal installation

sudo yum update
sudo yum install httpd
sudo systemctl start httpd.service
sudo systemctl enable httpd.service
sudo yum install mariadb-server mariadb
sudo systemctl start mariadb
sudo mysql_secure_installation
sudo systemctl enable mariadb.service
sudo yum install php php-mysql
sudo systemctl restart httpd.service

Setting up directory for e-xpert.pl / global permissions

sudo chmod -R 755 /var/www
sudo mkdir -p /var/www/e-xpert.pl/public_html
sudo chown -R apache: /var/www/e-xpert.pl/public_html

Setting up virtual host

sudo nano /etc/httpd/conf.d/e-xpert.pl.conf

<VirtualHost *:80>
    ServerName www.e-xpert.pl
    ServerAlias e-xpert.pl
    DocumentRoot /var/www/e-xpert.pl/public_html
    
    <Directory /var/www/e-xpert.pl/public_html>
        Options -Indexes +FollowSymLinks
        AllowOverride All
    </Directory>
    
    ErrorLog /var/www/e-xpert.pl/error.log
    CustomLog /var/www/e-xpert.pl/requests.log combined
</VirtualHost>

sudo apachectl restart

Fixing SELinux permission issue preventing httpd service from getting append/read access to x file

sudo setsebool -P httpd_unified 1