Getting Started
-
3. Testing LAMP
Finally, to Test LAMP WebServer Installation
Access the Server document root:cd /var/www/html
Create a PHP info file:
sudo nano info.php
Append:
<?php phpinfo(); ?>
Ctrl+x to Save & Exit from nano.
Set apache as owner of the web root directory:sudo chown -R apache:apache /var/www
Now open a browser and go to:
http://localhost/info.php
For a remote server, replace “localhost” with your Server IP.
-
4. Setting up Firewall
(Optional) To Allow Remote Web Access
Enable HTTP service:sudo urpmi firewalld
sudo systemctl enable --now firewalld
sudo firewall-cmd --permanent --zone=public --add-service=http
Reload firewall:
sudo firewall-cmd --reload
How to Create an Apache 2 Virtual Host on Mageia Linux
Contents