How to avoid all problems in server and website management: a beginner's guide with tips and solutions to common errors

For a beginner, server and website management appear daunting. However, with the right tools, even the most complex processes can be simplified and automated. In this guide, we will share the basics of server and website management and share a few tips from how to choose the right tools to how to solve some common problems. Preparation – learning the basics of server infrastructure Before setting up a server, it's important to understand how servers work. Here are the basic elements you will encounter: Different types of servers: physical, virtual (VPS), and cloud. Start with VPS – they are affordable and easy to test. Operating systems: Ubuntu — this is one of many operating systems (distributions) built on the Linux kernel, the easiest one for beginners to understand. Basic Linux commands: learn how to install software and manage the file system and processes. What will help you figure everything out fastest: Install VirtualBox and download the Ubuntu Server image. Set up a local virtual machine for testing. Take a basic Linux course – there are free lessons on YouTube. Practice some commands: for example, create files (touch), move them (mv), edit them (nano), and set permissions (chmod). Selecting the right management tool There are two ways to manage your server – through the console or a control panel. The console – flexibility and functionality for experienced users Pros: The most flexibility. All configuration is manual, allowing you to customize everything exactly how you want. Versatility. There is a console on all servers and no additional software is needed. Great for automation using scripts and task schedulers. Cons: Requires experience: you need to know the commands and their variables. Entering the wrong command can cause problems. There is no GUI. A control panel – great for beginners A control panel is a graphical interface that makes server management easier. With a control panel, you can: Set up domains, databases, and SSL certificates. Create backups and manage users. Easily install CMSs like WordPress, etc. We recommend using the control panel and a console together. The panel will simplify routine tasks and the console will give you full control over the server. There is a wide range of control panels on the market – choose one based on the configuration of your server, your budget and the needs of your project. We recommend ispmanager, a panel that has been installed over 700,000 times on hundreds of thousands of servers in over 150 countries. Try ispmanager for free → To find out how to install the ispmanager control panel and resolve any problems whil doing so, see the ispmanager blog. Automate routine tasks Automating regular tasks will let you focus on more important things. Tasks that can be automated: Backups. Setting up regular backups. In ispmanager, you can do so in 5 minutes by configuring the schedule and parameters. In the console, use rsync or tar to make copies of your files. Software Updates. In Ubuntu, use unattended-upgrades – a tool to automatically update your packages. In CentOS, configure yum-cron. Resource Monitoring. Install Zabbix or Netdata to monitor the server load. In ispmanager, you can use the built-in tools to monitor your resources in real time. What server resource monitoring looks like in ispmanager Configuring server and site security Mistakes in security configuration or a lack thereof can leave you vulnerable to data leaks and hacking. Even small projects get attacked and hacked – so never neglect security. How to configure security on your server: Use SSH keys instead of passwords. Generate a key: ssh-keygen -t rsa Add it to the server: ssh-copy-id user@server_ip Restrict access. Change the default SSH port (22) to a non-standard port, such as 2222. Disable password login by entering PasswordAuthentication no in /etc/ssh/sshd_config Install an SSL certificate to secure your connection. In ispmanager, you can install a free SSL certificate from Let's Encrypt. Managing your logs – find and eliminate errors Logs are records of all the events on the server. They help you understand what is happening and identify the causes of problems. How to work with logs: Check for errors. Connect via SSH and type: tail -f /var/log/apache2/error.log Find the lines you need using grep, for example: grep '500' /var/log/apache2/error.log Use visualization. Install GoAccess to analyze your logs in real time. For complex systems, try the ELK Stack – Elasticsearch, Logstash, and Kibana. Common errors and how to fix them 403 Forbidden error. Cause — insufficient access rights to files or folders. Solution: Check permissions using the ls -l command. The permissions for your site’s files should usually be 644 and the folders should be 755. Set the right permissions with the command: chmod 755 /path/to/your/site Make sure the owner

Jan 22, 2025 - 18:49
 0
How to avoid all problems in server and website management: a beginner's guide with tips and solutions to common errors

For a beginner, server and website management appear daunting. However, with the right tools, even the most complex processes can be simplified and automated.

In this guide, we will share the basics of server and website management and share a few tips from how to choose the right tools to how to solve some common problems.

Preparation – learning the basics of server infrastructure

Before setting up a server, it's important to understand how servers work. Here are the basic elements you will encounter:

  • Different types of servers: physical, virtual (VPS), and cloud. Start with VPS – they are affordable and easy to test.
  • Operating systems: Ubuntu — this is one of many operating systems (distributions) built on the Linux kernel, the easiest one for beginners to understand.
  • Basic Linux commands: learn how to install software and manage the file system and processes.

What will help you figure everything out fastest:

  • Install VirtualBox and download the Ubuntu Server image. Set up a local virtual machine for testing.
  • Take a basic Linux course – there are free lessons on YouTube.
  • Practice some commands: for example, create files (touch), move them (mv), edit them (nano), and set permissions (chmod).

Selecting the right management tool

There are two ways to manage your server – through the console or a control panel.

The console – flexibility and functionality for experienced users

Pros:

  • The most flexibility. All configuration is manual, allowing you to customize everything exactly how you want.
  • Versatility. There is a console on all servers and no additional software is needed.
  • Great for automation using scripts and task schedulers.

Cons:

  • Requires experience: you need to know the commands and their variables.
  • Entering the wrong command can cause problems.
  • There is no GUI.

A control panel – great for beginners

A control panel is a graphical interface that makes server management easier.

With a control panel, you can:

  • Set up domains, databases, and SSL certificates.
  • Create backups and manage users.
  • Easily install CMSs like WordPress, etc.

We recommend using the control panel and a console together. The panel will simplify routine tasks and the console will give you full control over the server.

There is a wide range of control panels on the market – choose one based on the configuration of your server, your budget and the needs of your project. We recommend ispmanager, a panel that has been installed over 700,000 times on hundreds of thousands of servers in over 150 countries.

Try ispmanager for free →

To find out how to install the ispmanager control panel and resolve any problems whil doing so, see the ispmanager blog.

Automate routine tasks

Automating regular tasks will let you focus on more important things.

Tasks that can be automated:

  • Backups. Setting up regular backups. In ispmanager, you can do so in 5 minutes by configuring the schedule and parameters. In the console, use rsync or tar to make copies of your files.

  • Software Updates. In Ubuntu, use unattended-upgrades – a tool to automatically update your packages. In CentOS, configure yum-cron.

  • Resource Monitoring. Install Zabbix or Netdata to monitor the server load. In ispmanager, you can use the built-in tools to monitor your resources in real time.

Image description
What server resource monitoring looks like in ispmanager

Configuring server and site security

Mistakes in security configuration or a lack thereof can leave you vulnerable to data leaks and hacking. Even small projects get attacked and hacked – so never neglect security.

How to configure security on your server:

Use SSH keys instead of passwords.

  1. Generate a key: ssh-keygen -t rsa
  2. Add it to the server: ssh-copy-id user@server_ip

Restrict access.

  1. Change the default SSH port (22) to a non-standard port, such as 2222.
  2. Disable password login by entering PasswordAuthentication no in /etc/ssh/sshd_config

Install an SSL certificate to secure your connection. In ispmanager, you can install a free SSL certificate from Let's Encrypt.

Managing your logs – find and eliminate errors

Logs are records of all the events on the server. They help you understand what is happening and identify the causes of problems.

How to work with logs:

Check for errors.

  1. Connect via SSH and type: tail -f /var/log/apache2/error.log
  2. Find the lines you need using grep, for example: grep '500' /var/log/apache2/error.log

Use visualization.

  1. Install GoAccess to analyze your logs in real time.
  2. For complex systems, try the ELK Stack – Elasticsearch, Logstash, and Kibana.

Common errors and how to fix them

403 Forbidden error.

Cause — insufficient access rights to files or folders.

Solution:

  1. Check permissions using the ls -l command. The permissions for your site’s files should usually be 644 and the folders should be 755.
  2. Set the right permissions with the command: chmod 755 /path/to/your/site
  3. Make sure the owner of the files and folders is specified correctly: chown -R www-data:www-data /path/to/your/site (for Ubuntu).

Error 500 Internal Server Error.

Cause — problems in the web server configuration, PHP, or .htaccess file.

Solution:

  1. Check your server logs with the command: tail -f /var/log/apache2/error.log or tail -f /var/log/nginx/error.log
  2. If the error involves the .htaccess file, temporarily rename it (mv .htaccess .htaccess .htaccess.bak) and see if the site works.
  3. Make sure that all necessary PHP modules are installed and activated. For example, to check what modules are installed, type: php -m

The site is unavailable – DNS error.

Cause — the DNS records are not configured correctly.

Solution — check DNS with dig yourdomain.com or use online troubleshooting services like MXToolbox.

The server is not responding – Timeout error

Cause — high server load or incorrect web server configuration.

Solution:

  1. Check the server load with the top or htop command.
  2. Increase the request handling limits in your server configuration.

Database connection error.

Cause — incorrect access data or a disabled database.

Solution:

  1. Check your site's configuration file (e.g., wp-config.php for WordPress).
  2. Make sure the database is running with systemctl status mysql or systemctl status postgresql

The main points on server and site management

Learn the basics of server infrastructure. Learn how servers work and the basic Linux commands.

Choose the right tool for the job. Use the console for complex tasks or a control panel with a visual interface like ispmanager. Better yet, use both. =)

Automate routine tasks. Set up backups, software updates, and monitoring.

Never neglect security. Use SSH keys, configure SSL, and restrict access to the server.

Check your logs – learn how to find and fix errors in your logs. Use Logwatch, GoAccess, or your control panel.

If this was helpful, subscribe to ispmanager on Dev.to so you don't miss our upcoming articles.

What's Your Reaction?

like

dislike

love

funny

angry

sad

wow