Monthly Archives: July 2017

How to create MySQL database/users in Vesta

MySQL databases are an important aspect of your web server. With Vesta CP is very easy to create databases and users.

How to create a MySQL database and a user for it:

1. Access VestaCP at

2. From the top menu choose DB

vesta databases1

3. You will see a list of active databases. To add a new database, click the ADD DATABASE button

vesta databases2

4. Enter your Database name, the User, Password (the system can generate a strong password for you), Charset (uft8 is the default).

vesta databases3

5. Click the Add button. The new database and user will be created and you will see a confirmation message Database user_dbname has been created successfully.

Also, you will see a link open phpMyAdmin . If you click on it the VestaCP will open the phpMyAdmin interface. To access it you will need to enter the username and the password for the database you want to work with.

The short movie tutorial for this post:

Working with services in Vesta

Vesta has an interface that allows you to easily access server services like httpd, nginx, exim etc.

To access the interface for server services in Vesta:

1. Access Vesta control panel

2. From top menu choose Server

vesta services1

3. You will see the list of server services controlled by Vesta.

vesta services2

4. On each service-row you have three buttons:

CONFIGURE – you can edit the settings for that service
STOP/START – to stop or start the service
RESTART – to restart the service.

Notice that you can also control server services via bash. For example, to restart httpd service in CentOS:

[root@webcp ~]# service httpd restart
Redirecting to /bin/systemctl restart  httpd.service
[root@webcp ~]# 

The movie tutorial for this post:

Configure rules in Vesta Firewall

Vesta comes with a firewall out-of-the-box. It has a simple interface, but it’s more than nothing.

Notice that you can install a professional firewall for you server – like ConfigServer Security & Firewall (csf)

How to add a rule in Vesta Firewall:

1. Login to Vesta Control Panel

2. Look for Firewall link on the top menu

vesta firewall1

3. Click the +ADD RULE green button

vesta firewall2

4. Now enter:
Action: Drop if you want to block traffic; Accept if you want to allow traffic
Protocol: TCP, UDP or ICMP
Port: the port(s) you want to block/allow. Example: 80 ; 80-120.
IP: the IP(s) you want to block/allow.
Comment: any comment for the rule.
When done, click the Add button.

vesta firewall3

5. You will see the new rule in the firewall rules list:vesta firewall4

6. Also, you can EDIT, SUSPEND or DELETE rules. Just click the button for your desired action.

vesta firewall5


The movie tutorial for this post:

How to change the hostname, language and time zone of your Vesta installation

Little things can be very important on a web server. We will show you here how to change the server hostname, the language of the system and the time zone for the server in Vesta. The steps are:

1. Access you Vesta installation.

2. Click the Server button on the top menu

vesta settings1

3. Click the CONFIGURE button.

vesta settings2

4. Here enter the desired values for Hostname, Time Zone and for the Default Language.

vesta settings3

5. When done, click the Save button.

The movie tutorial for this post:

How to change PHP settings in Vesta

Many times, you will need to change the PHP settings on your web server. For example you may want to change the values for memory_limit, upload_max_filesize etc.

To change the PHP settings in Vesta CP:

1. Log into VestaCP

2. From the top menu click on Server

vesta php settings1

3. On the page that opens, look for httpd entry and click the CONFIGURE button on that row.

vesta php settings2

4. Click the CONFIGURE PHP.INI link

vesta php settings3

5. You will see the basic interface for PHP settings. Here you can change the most used PHP settings like:  max_execution_time, max_input_time, memory_limit, error_reporting, display_errors, post_max_size, upload_max_filesize.

6. At the bottom of the page there is a link to Advanced Options. Click it if you want to alter other PHP settings.

vesta php settings4

7. Another page will open.

vesta php settings5

8. When done editing basic or advanced PHP options, click the Save button.


If you prefer you can change the PHP settings from the command line. Just edit the /etc/php.ini file in your preferred text editor (vi, nano etc). For example:

nano /etc/php.ini


The movie tutorial for this post:

Page 3 of 4
1 2 3 4