Need a Minecraft server? BeastNode offers the highest performance servers with DDoS protection!

Shop for plans now


How to Install Apache Web Server and PHP on CentOS VPS

How to Install the Apache Web Server and PHP on CentOS VPS
This guide will explain the basics on installing an Apache web server with PHP5 on your VPS.

First, login to your BeastNode VPS and run the following commands:

yum install httpd
(confirm any prompts)
yum install php php-mysql
(confirm any prompts)

Now start up the Apache/HTTPD server:
service httpd restart


If there weren't any errors, you should now be able to access your web server using the IP address of your VPS. You should see a test page confirming that the installation worked.

You can find the default root directory (where your website files are stored) in the following folder:
/var/www/html

Was this answer helpful?

 Print this Article

Also Read

How To Set A Hostname For Your BeastNode VPS

To set a host name for your BeastNode VPS running on a RedHat distro (CentOS for example), just...

Securing your VPS

Running a VPS can be risky if you do not go through with some basic security measures before...

Common Linux SSH/Shell Commands

This is a list of frequently used Linux SSH/shell commands. It may not apply to all Linux...

Disable Firewalld on CentOS 7

If for any reason you need to disable the firewalld service on your CentOS 7 VPS (such as to test...

How to Login to Your VPS

In this guide, we'll be going over how to login to your VPS via SSH terminal/console....