Open Fedora Port 80
After installing the LAMP stack on Fedora, you need to open port 80 in the Firewall to access the PHP programs on the Fedora instance from external servers. You can open a firewall port by launching the firewall-config application as the root
user with the following syntax:
firewall-config |
The firewall-config
utility opens the following dialog:
Click on the Ports tab, and you’ll see the following:
Skip this step if you only want to set the runtime privilege to the port. Click on the Runtime tab and change it to Permanent if you want the port to be accessible when you reboot your OS.
Click on Add button to add a port exception, and you’ll see the following:
Enter Port 80 for the Apache server unless you used a different value for the Apache server’s listener port. If you’re not sure open the /etc/httpd/conf/httpd.conf
file and check for the following line (default value shown):
Listen 80 |
Click the OK button to set the port exception. Then, you can connect to the Linux machine with the IP address, a DNS name, or a name you resolve in your local hosts
file, like:
http://192.168.2.1/query.php |
You can find the IP address of your Fedora image by inspecting the /etc/hosts
file or capture a DHCP assigned address with the following command as the root
user (or with sudo
as a valid sudoer user):
ifconfig -a |
It should return the following image, which is based on the data stored in MySQL’s studentdb
database, as qualified in yesterday’s blog post:
I hope this helps those setting up a LAMP instance to work with the MySQL database.