1. Home
  2. Cloud and Servers
  3. Virtual Servers (VPS)
  4. Editing configuration file on a virtual server

Editing configuration file on a virtual server

EDITOR NANO


Option to edit the configuration of the software on the server is an indisputable advantage of VPS.

Most direct route to change the settings is to edit a configuration file on the server.

Use it for example when hosting needs to increase the limit memory for PHP, allowing external access to database or increase the value of MaxClients

On the servers there is preinstalled editor nano for quick editing. It is easily used and thus it is suitable for beginners. You can start it by:

nano /path/to/file 

In the lower part there is a knowledge base with list of commands and shortcuts. Key CTRL is replaced with a symbol ^ for saving space on the screen. Ctrl 9 O saves the file, Ctrl + X closes the editor.

Editing file works like in many other editors. You use a cursor moved by arrow keys to navigate, for deleting you use Delete or Backspace. For larger files it is useful to search, that can be used Ctrl + W.

OFTEN EDITED FILES


We have prepared a short list of often edited files and their description and use. By default the configuration files are stored in directory /etc/ , most of the server configuration files are located there.

/etc/php5/apache2/php.ini – main configuration file php for web, that contains for example values memory_limit, upload_max_filesize 

/etc/apache2/apache2.conf  – controls the behavior of the apache2 webserver, eg. via value MaxClients

/etc/apache2/sites-enabled/   – in this directory there are Apache2 configuration files for each hosting

/etc/mysql/my.cnf – here are all settings for database server, where you can enable external access to the database.

Updated on January 3, 2025

Was this article helpful?

Related Articles