Hosting Apache Server with XAMPP on CentOS 7
Download xampp installer from the website above.
We now have to execute the installer.
If you just try running the file by double clicking on the file you will get the following error.
To run the file we have to make it an executable.
Right clickon the file and
Go to the permissions tab.
Make the file an executable by allowing it too execute.
If you try to execute the program now, a diolog box will inform you that you can only execute as root.
To resolve this we can open a terminal and run the file as root.
Right clickto open a terminal to the current directory with the file we want to execute.
Execute the file with sudo and type your password when asked.
$ sudo ./xampp-linux-64-7.4.7-installer.run $
Follow the installer.
Launch the application after the install by checking the box to launch XAMPP.
The application should be open.
Start an apache server in the application
Open the application
Manage servers, highlight
Apacheby clicking on it, and click
Check if the apache server is online by opening a browser and type
localhost. You will be navigated to
localhost/dashboard. This webpage is running on the local Apache server. Note: if you stop the server from running, you will not be able to view this page.
Locating Apache Server Root Directory
To View root directory of the Apache Server being hosted, click in the XAMPP app click on
Open Conf file(The configuration file).
Click yes to manually edit the
You should see something like this.
Locate the ServerRoot Line
Here, it is indicated the root directory of the server:
You can open a file explorer and navigate to this direcotory. This is where you can make changes to files you want hosted.
You can find the home page within this root directory. Here is where the dashboard html is:
Opening the html file, you can see the similarities to the dashboard home page.
Access Apache Server on CentOS VM
To access an Apache server running on a CentOS 7 VirtualBox machine from a host (the physical computer):
Start XAMPP GUI App
- Ubuntu 16.04 - How to start xampp control panel
Executable to start GUI can be found here
$ cd /opt/lampp
If you use a 32-bit system:
$ sudo ./manager-linux.run # or manager-linux-x64.run
If you use a 64-bit system:
$ sudo /opt/lampp/manager-linux-x64.run
You will then see the xampp app launch.
Start XAMPP Apache Server from Terminal
Found from: Ubuntu 16.04 - How to start xampp control panel
Starts Apache Server from Terminal
sudo /opt/lampp/lampp start
- 2020.06.18 Create Apache File
- 2020.06.24 Added Step Numbers and sections
- 2020.07.03 Updated syntax to follow markdown rules
- 2020.07.07 Added
Start XAMPP GUI Appsection
- 2020.07.29 Added
Start XAMPP Apache Server from Terminalsection