- How to register a domain?
- How to transfer a domain to LEA.mx?
- How to configure the domain’s DNS settings?
- How to add or renew an SSL certificate?
- How to force using an SSL connection on a website?
- Free SSL certificates for hosting plan VIP
- Where can I find the current prices of services?
- How to check payment history?
- How to generate invoices for paid services?
- Basic parameters for email configuration
- How to manage an email account?
- How to increase mailbox space?
- Basic parameters for FTP configuration
- How to manage an FTP account?
- How to log in to the online FTP client on LEA.mx?
- Basic parameters for database configuration
- How to add a database and a database user?
- How to access PhpMyAdmin?
- How to create a backup?
- How to move your website from computer to hosting?
- How to restore a website from your own backup?
- How to move your website from another hosting?
- How to configure your .htaccess
- How to get Google to index my website?
How to add a VPS in the control panel
- Click "Add".
- Select the server type. The detailed description of the parameters is given in VPS Servers section on our webpage.
- Select for how long you want to use your VPS server:
- If you have a discount code, please enter it in "coupon code" field. If you do not have it, leave this field empty. Than select the payment method:
In the "Distribution" field select the operating system that you want to install on the server:
- You also have the possibility to automatically install an administrative panel, which provides an easy interface to configure the server through a web browser. The panel ispconfig is available in Debian Wheezy and Ubuntu, the panel webmin - in all systems and additionally in Debian Wheezy and Arch Linux.
Set a password for the root user on the server. The password must be at least 8 characters long and contain at least one lowercase letter, one uppercase letter and one number. After setting the password, press "Add".
Installing a web server on Debian Wheezy using SSH
If you have not installed the administration panel, you can install it from the command line or use terminal for administration for your server (for example, by combining SSH).
You can access the server in two ways: by the user panel or by the SSH client.
To access the server through the control panel, go to the VPS Servers section and click "Terminal".
To connect via SSH on Windows, you can use the PuTTY client. To connect on Linux, MacOS, or any Unix, use this terminal command:
ssh firstname.lastname@example.org (server is the name of your server, which you can find in the VPS Servers section in the control panel.
When the first connection is established, this message may appear:
The authenticity of the host 'server.lea.mx (xxx.xxx.xxx.xxx)' can not be established. - this means that your SSH client is connecting to a new server, and you must confirm that the server is trusted (for further verification you can show the SSH key for this server). After the confirmation, you will be prompted to enter the password for root (enter the password that has been set when you were adding the server). After connecting to the server, a command prompt will appear ~#: root@server:.
To install the Apache web server with PHP support, the database server, phpMyAdmin, and a mcedit text editor (to edit configuration files), use the following command:
apt-get update &re& apt-get -y dist-upgrade # Updating system apt-get install apache2 mysql-server libapache2-mod-php5 phpmyadmin mc # Installing Software
During installation, the wizard prompts you to set a password for the user root on the MySQL database server. This is a different user root system, but it has similar features in the database: it has an unlimited control. This password is used to add new users and databases using phpMyAdmin interface. When entering the password is not displayed for security reasons.
after installation of Apache and MySQL server automatically starts installing phpMyAdmin. during installation, you must choose which web server to use for phpMyAdmin (in this case it is Apache2).
You also need to enter the password root you created in the previous steps, to set up a database in phpMyAdmin.
After installation, the VPS server is already running a web server (Apache2), database (MySQL) and has a configured phpMyAdmin. To verify that everything is installed and running, type in the address bar of your web browser address of your server: http://server.lea.mx/. You will see the welcome page of Apache2 with the text "It works!".
To enter phpMyAdmin, type the address http://server.lea.mx/phpmyadmin. user - root, password - the one you have set up in the previous steps for MySQL.
After installing Apache2 the root folder on the web server is /var/www. To upload files using SFTP (same as in FileZilla) on the server, it is best to create a separate user and add it to the group www-data (to protect against over-writes or accidental erasure in the system files):
adduser webmaster # Creating a user and enter password adduser webmaster www-data # Adding it to the group www-data
Also set permissions in the directory /var/www/ so that users in the group www-data could upload files:
chgrp www-data /var/www # Change the group chmod g+w /var/www # Adds write permissions to directory
After this you can already connect via FileZilla or another client that has the function of SFTP, placing some data like these:
- server: server.lea.mx
- user (login): webmaster
- password: the one you have set when you have added the user webmaster
Once connected, go to the directory /var/wwwand upload your files to that directory.
Servers with open ports for SSH connections are often attacked by "brute force" by botnets - a special bots that are trying to decipher the password root to connect to your server via SSH. To prevent this from happening, you can use the login via SSH public key instead of the account password root - authentication using the public key is not sensitive to the method of "brute force". First, you have to generate an SSH key on your computer, and then copy the public key to the server. When generating a key it is best to place a password - thus the key will be encrypted with the password that will be necessary for its use.
ssh-keygen # Generating the key ssh-copy-id email@example.com # Copying it to the server
When you have copied the key, to log in to the server instead of the password root, password is checked in the key on your computer:
ssh firstname.lastname@example.org Enter passphrase for key '/home/user/.ssh/id_rsa':
When you log in using an SSH key, you can disable the password on the account root. You must edit the file /etc/ssh/sshd_config:
Modification of the directive:
you can update the service configuration ssh:
service ssh reload
After connecting to the root only it is possible through the ssh key that you previously added. Attempts to log in with a password will always be unsuccessful - even in the case of providing the correct password.