Introduction
This is another article where the main focus is to define or to add a port forwarding rule. So, there is a web-based application using Code Igniter 4 is running. Moreover, that web-based application is providing a service for listening an incoming request or connection. It is running in a guest machine. So, the guest machine is actually a virtual server running in VirtualBox application.
The service running using web-based application is inside the virtual server. Using a specific port with a specific command where the tool is available from Code Igniter 4 it is possible to do it. So, after running the command using HTTP protocol in a specific port, it is available for access from the host machine. By default, running the command for activating the service will use port 8080 for web-based application using Code Igniter 4.
Adding Port Forwarding Rule to Access Code Igniter 4 Web-based Application Service
In order for accessing the Code Igniter 4 Web-based application service, the following are the steps to achieve it :
1. First of all, just access the VirtualBox Application as in the following image :
- Next step, just access the setting of the virtual server. It will appear just by right clicking the virtual server as in the following image :
- Continue on from the previous step, just select the Network tab. The following image will appear :
- Furthermore, just click the Port Forwarding button. It will display a dialog box with the content of rules for forwarding request from host machine to the guest machine. Since the service request is for accessing the web-based application using Code Igniter 4, just click the plus sign. It is to add a new rule as in the following image :
The following image is the image after successfully adding new rule. There are already rules for another service. The rule for web-based application using Code Igniter 4 exist in the last line as follows :
In summary, the last line in the above display is the default port for running Web-based application using Code Igniter 4. Upon executing ‘php spark serve’ to run it, it will use port 8080. It is actually represent the web-based application using Code Igniter 4 service port forwarding rule.
One thought on “How to Add Port Forwarding Rule to access Code Igniter 4 Service of Guest Machine running in VirtualBox Manager from Host Machine”