Getting Apache Configuration Error on Virtualmin

I have just created an SMTP using SSH on Virtualmin.

OS: Ubuntu 20.04

While I was doing the basic configuration, I got this error when I clicked “Recheck and refresh configuration”.

Error Details:
(2)No such file or directory: AH02291: Cannot access directory ‘/var/log/virtualmin/’ for error log of vhost defined at /etc/apache2/sites-enabled/mailSMTP-02.growthandmotivation.com.conf:1
AH00014: Configuration check failed
Action ‘configtest’ failed.
The Apache error log may have more information.

Can anyone help me in getting this solved? Would really appreciated you!

I don’t know what this means. An SMTP what? I see you’ve got an Apache vhost called mailSMTP..., but Apache has nothing to do with SMTP, so I’m confused.

The error indicates /var/log/virtualmin doesn’t exist…which shouldn’t happen, but if you’ve not created domains with Virtualmin yet, it wouldn’t exist. Why would you use that directory for logs if the domain isn’t created by Virtualmin? All around confused.

Maybe just post that mailSMTP-02.growthandmotivation.com.conf file so we can see what you’re trying to do here?

Hi, thank you for giving a prompt reply.

Please allow me to make it simple for you:

I have two VPS on Digital Ocean and I my plan is to send emails using these servers.

So I followed an expert to create SMTPs on these VPS.

I have created an SMTP on first VPS using Putty (which is an SSH client).

I have done this by using following commands:

wget http://software.virtualmin.com/gpl/scripts/install.sh
sudo /bin/sh install.sh

After that, I pointed my server to a domain by adding the IP of server to this domain. Then I logged in to Virtualmin, done the basic configuration and integrated this server with an Email Marketing App and Boooom! My SMTP was ready!

Now, I am trying to do the same with my second VPS. I have followed the same method which I have followed for first VPS.

When I logged into Virtualmin for the second server (mailSMTP-02) and was doing the basic configuration, I got this Apache error when I clicked “Recheck and refresh configuration”.

P.S. I want to point this second SMTP to the same domain which I used for the first SMTP.

Here is my Apache error log:

[Tue Oct 06 14:48:35.052921 2020] [mpm_prefork:notice] [pid 50560] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 configured – resuming normal operations
[Tue Oct 06 14:48:35.052995 2020] [core:notice] [pid 50560] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Oct 06 14:49:24.987303 2020] [mpm_prefork:notice] [pid 50560] AH00171: Graceful restart requested, doing restart
[Tue Oct 06 14:49:25.059810 2020] [mpm_prefork:notice] [pid 50560] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 configured – resuming normal operations
[Tue Oct 06 14:49:25.059832 2020] [core:notice] [pid 50560] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Oct 06 14:49:47.676155 2020] [mpm_prefork:notice] [pid 50560] AH00169: caught SIGTERM, shutting down
[Tue Oct 06 14:49:47.796483 2020] [suexec:notice] [pid 62457] AH01232: suEXEC mechanism enabled (wrapper: /usr/lib/apache2/suexec)
[Tue Oct 06 14:49:47.821723 2020] [mpm_prefork:notice] [pid 62466] AH00163: Apache/2.4.41 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.1f configured – resuming normal operations
[Tue Oct 06 14:49:47.821743 2020] [core:notice] [pid 62466] AH00094: Command line: ‘/usr/sbin/apache2’
[Tue Oct 06 15:20:58.725057 2020] [mpm_prefork:notice] [pid 62466] AH00169: caught SIGTERM, shutting down

I am not a programming geek so please help me in resolving this :slight_smile:

You keep using SMTP to refer to something in Apache? That doesn’t make sense. Apache is not an SMTP server. It is a web server (HTTP/HTTPS). Virtualmin does have an SMTP server (Postfix), but I can’t make any sense out of what you’re trying to accomplish.

The error log entries in this second post are not showing anything unusual…it looks like a normal shutdown and restart and then shutdown. So, no errors to speak of.

I still don’t know what you’re trying to do or what is going wrong.

I would be using this server to send emails.

Please see the image below for more details:

On Virtualmin dashboard, it is asking me for verify virtualmin configuration.

When I am configuring configuration, it is giving me this error.

…and it is saying "… your system is not ready for use by Virtualmin."

How can I get my system ready to send emails? Obviously it will only possible by solving this Apache error (not sure)

Please make me clear, does Apache has something to do with sending emails?

Read my first reply above. I already covered the error you’re showing. The /var/log/virtualmin directory does not exist or has inappropriate permissions, probably because you created a vhost using that log directory outside of Virtualmin (which should not use the /var/log/virtualmin directory…that directory is for logs for vhosts created by Virtualmin). Use the regular Apache log directory if you are creating vhosts in Apache outside of Virtualmin.

No.

You mentioned an email app, which may very well be a web application. But, Apache does not send email and it is not an SMTP server.

I have checked the system logs and it does not have /var/log/virtualmin directory as you mentioned above.

Can you please tell me how can I create this directory??

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.