Virtualmin common Website errors








Are you trying to figure out how to troubleshoot common website errors in Virtualmin? 

This guide is for you.


Sometimes, Virtualmin users runs into problems while using it to host thier websites.

Some of the issues relates to Email, dns, ssl and installation problems like to network connectivity, package management, or attempting to run the install script on an unsupported operating system or architecture.

Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to fix Virtualmin related errors.

In this context, we shall look into the common website errors in Virtualmin and how to resolve them.


The process of troubleshooting Common Website Errors in Virtualmin?

Here, we shall look into how our Support Engineers troubleshoot a few common website errors.

Mostly, the webserver problems are relatively easy to troubleshoot. However, some errors are tricky since they are not configuration related error. So they might not show up in the "error_log".

As with any control panel, it is important to be able to view your access logs and error logs. This ensures that everything is functioning correctly with the website or server.

Moreover, Virtualmin allows viewing both the access logs and error logs associated with any domain on the server.


How to fix virtualmin errors by inspecting the Webserver Logs?

This is the first place to look to find hints regarding any problem. Normally, the log files for most applications would be stored in the /var/log folder. However, this can vary depending on the Operating System.

The error log can be traced back to the /var/log/apache2/error_log on Debian based servers and the error log file can be found at /var/log/httpd/error_log on RHEL based servers. The access log would be in the same location, exception with the name of access_log. /var/log/apache2/access_log and /var/log/httpd/access_log respectively.

Every virtual server or sub-server in Virtualmin has its own web server log files. They are found in the logs directory in the virtual servers’ home directory (ie, "/home/example/logs").


How to View The Logs In Virtualmin to fix errors?

i. First, log into Virtualmin Control Panel

ii. Then under the Virtualmin section, select the domain from the dropdown menu that contains the logs to be viewed.

iii. From the below available options, select the Logs and Reports section

iv. Here, it is possible to view both the access logs and error logs for Apache web-server separated into two options. To view your Apache Access Logs, click on the respective button. The same approach applies with the Apache Error Logs.

 

How to resolve virtualmin when the Wrong Site Shows Up?

Sometimes, if you access the website in the browser and see the wrong website contents, then it is likely an issue with the IP address mismatch on the system.

That is, Apache may be listening for requests for your domain on a particular IP address, but the request came in on a different address than expected. This can affect the ranking of the affected website due to duplicate contents and it is recommended to fix it as soon as you can to help boost the website for SEO optimization.

In order to resolve this problem, first, check the IP address present on the server. Here is the command to find it;

# ip addr sh

Then find what IP address(es) Apache is expected requests to come in on by reviewing the VirtualHost section of your Apache config.


A quick way to do that is using the following command:

On CentOS:

grep -i ‘<virtualhost’ /etc/httpd/conf/httpd.conf

On Ubuntu/Debian:

grep -i ‘<virtualhost’ /etc/apache2/sites-enabled/*.conf

That output will produce a series of lines that look something like this:

<VirtualHost x.y.z.q:80>

Where "x.y.z.q" is the IP address. You would want to make sure that IP addresses listed there are all IP addresses that were shown in your ip addr sh output above.


Then verify that each VirtualHost blocklists an IP address, and not an asterisk (*) character. In case, if you make any changes then do restart the Apache.

Here is the command to restart Apache.

CentOS:

# service httpd restart

Ubuntu/Debian:

# service apache2 restart

After correcting the Apache config, review some options in Virtualmin to make sure new records are being created correctly. Those options are in System Settings >> Virtualmin Config >> Network Settings:


How to tackle 500 Internal Server Error in Virtualmin?

This is one of the annoying error of every Apache administrator’s existence, as it rarely results in a useful error message in the error_log. And, to compound matters, permission problems show up in the suexec_log, which users do not have access to.


How to resolve Permissions issues in Virtualmin?

A common problem in an environment using suexec is that permissions on the executable files are too loose. If a group or other users can write your scripts in a suexec environment, they will not execute. The right permissions for scripts in a suexec equipped system are 750 or less. The script will be executed as the owner of the domain, so as long as the owner has appropriate permissions the script will be executable by the Apache suexec process.


How to fix Script Bugs in virtualmin?

Scripts may have errors in syntax or be incompatible with the default version of PHP. In order to check the syntax, you can run the below command from the command line by explicitly calling PHP and the script;

php -l scriptname.php

If you think it might be a version mismatch you could see if the script runs with each of the available versions (Virtualmin provides both PHP4 and PHP5 on most supported platforms).

php4 scriptname.php

And:

php5 scriptname.php

Scripts may also not have the correct permissions for the files it needs to access. A common problem is unzipping or untarring a script archive as root for use by a domain account user. This will result in files that may not be readable or writable by the domain owner, and thus unreadable or unwritable by the suexec process. Check to be sure the files are all owned by the owner of the domain using ls -l. If they aren’t, you can use:

chown -R domainname:domainname scriptdirectory


[Need urgent assistance with Virtualmin errors? We are available to help you.]



Conclusion

This article will guide you on the steps to troubleshoot common website errors in Virtualmin.


For Linux Tutorials

We create Linux HowTos and Tutorials for Sys Admins. Visit us on LinuxAPT.com

Also for Tech related tips, Visit forum.outsourcepath.com or General Technical tips on www.outsourcepath.com