A cloud-hosted server allows for full-featured websites to be implemented with sophisticated implementations and high resource utilization. Linux servers ensure that cloud-based applications consistently perform with dedicated hardware resources. In the event of a problem with your system, there are several places to look. Most of them are applicable to Linux systems in general, while some are specific to SUSE Linux Enterprise Desktops.
How to troubleshoot?
- Review the logs
- For instance, if you have an Apache server running on an Ubuntu server, by default the logs will be kept in /var/log/apache2.If you have a database backend that is giving you trouble, that will likely keep its logs in /var/log as well. Use a search engine to try to find relevant information that can point you in the right direction.
- Have you installed your server?
- Installing Apache on Ubuntu or Debiansudo apt-get updatesudo apt-get install apache2
- Installing Nginx on Ubuntu or Debiansudo apt-get updatesudo apt-get install nginx
- Installing Apache on RHEL, Rocky or Fedorasudo dnf install httpd
- Installing Nginx on RHEL, Rocky or Fedora sudo dnf install nginx
- Do you have a web server running?
You can find out whether a service is running in a number of ways. It is possible to use netstat across a wide range of platforms. You can find out which processes are using the server’s ports by running netstat with the -plunt flags.
The nginx service can be started by typing:
sudo systemctl start nginx
Netstat can be used to verify everything is working properly if your web server starts.
- Are the Ports you Configured Open?
You must enter the IP address of your remote server and specify the port to check, as in the following example:
nc -z 220.127.116.11 80
This will verify that the server located at 18.104.22.168 has port 80 open. The command will immediately return if it is open. If it is closed, the command will keep trying in vain to establish a connection. You need to check the setup of your firewall if your web ports are not accessible. It could be necessary to open port 80 or port 443.
- Are the Permissions and Ownership Set Correctly?
The ownership and permissions of files and directories can be used to control this. The directories holding the content must be executable and readable by the user account connected to the web server in order to view files. Apache and Nginx are operated under the www-data group’s www-data user on Ubuntu and Debian.
To get a better understanding of the files you’re hosting, you can examine the following:
ls -l /path/to/web/root
Using chown, you can change the ownership of a file:
sudo chown user_owner:group_owner /path/to/file
Directory changes can also be made in this way. The -R flag controls ownership of all files under a directory and is used to do this:
sudo chown -R user_owner:group_owner /path/to/file
With these troubleshooting tips, hopefully, you have been able to find and fix some of the most common issues administrators encounter when trying to get their sites up and running.
Feel free to contact us if you have any additional suggestions for things to check or ways to solve the problem.