Webmin 1.941 apache issue

Anyone face issue when creating new virtual server from virtualmin but not able to create apache configuration failed issue?

Performing other Apache configuration …
… configuration failed : Apache virtual host was not found at …/web-lib-funcs.pl line 1495.

Adding new SSL virtual website …
… could not find non-SSL virtual website to copy directives from!

Hi,

It looks like you mis-edited Apache config. What is the output of these two commands?

apachectl configtest
apache2 -t

Note: For RHEL systems, the command should be httpd -t.

1 Like

May you are right something is wrong with apache2

apachectl configtest returns:

Syntax OK

apache2 -t returns:

 [core:warn] [pid 10637] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot

Try disabling and then enabling Apache feature on Edit Virtual Server page. It should just work by default, unless you break something manually.


Aside from possible solution above check /etc/apache2/apache.conf file and other configs from /etc/apache2/sites-available directory.

Still remain unsolved :sleepy:
My other server using Apache 2.4.25 is not having same issue at the sametime apache2 return same result.
Also site-available config file is created but content is not completed:
<VirtualHost *:80>

<VirtualHost *:80>

How does you /etc/apache2/envvars look?

here you go,

Summary

envvars - default environment variables for apache2ctl

this won’t be correct after changing uid

unset HOME

for supporting multiple apache2 instances

if [ “${APACHE_CONFDIR##/etc/apache2-}” != “${APACHE_CONFDIR}” ] ; then
SUFFIX="-${APACHE_CONFDIR##/etc/apache2-}"
else
SUFFIX=
fi

Since there is no sane way to get the parsed apache2 config in scripts, some

settings are defined via environment variables and then used in apache2ctl,

/etc/init.d/apache2, /etc/logrotate.d/apache2, etc.

export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data

temporary state file location. This might be changed to /run in Wheezy+1

export APACHE_PID_FILE=/var/run/apache2$SUFFIX/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2$SUFFIX
export APACHE_LOCK_DIR=/var/lock/apache2$SUFFIX

Only /var/log/apache2 is handled by /etc/logrotate.d/apache2.

export APACHE_LOG_DIR=/var/log/apache2$SUFFIX

The locale used by some modules like mod_dav

export LANG=C

Uncomment the following line to use the system default locale instead:

#. /etc/default/locale

export LANG

The command to get the status for ‘apache2ctl status’.

Some packages providing ‘www-browser’ need ‘–dump’ instead of ‘-dump’.

#export APACHE_LYNX=‘www-browser -dump’

If you need a higher file descriptor limit, uncomment and adjust the

following line (default is 8192):

#APACHE_ULIMIT_MAX_FILES=‘ulimit -n 65536’

If you would like to pass arguments to the web server, add them below

to the APACHE_ARGUMENTS environment.

#export APACHE_ARGUMENTS=’’

Enable the debug mode for maintainer scripts.

This will produce a verbose output on package installations of web server modules and web application

installations which interact with Apache

#export APACHE2_MAINTSCRIPT_DEBUG=1

What about line 80 of apache2.conf, since you have a syntax error there?

Did you try Ilias suggestion?

Have you tried stopping and starting apache2? Or rebooting the server?

Summary

The directory where shm and other runtime files will be stored.

DefaultRuntimeDir ${APACHE_RUN_DIR}

Yes, I did restart, reinstall as well.

But apache2 is running?

Any clues in /var/log/apache2/error.log?

It Is.

Whenever trying to create apache config the only log showing is graceful restart

Summary

[Thu Jan 23 16:36:29.641711 2020] [mpm_prefork:notice] [pid 26147] AH00171: Graceful restart requested, doing restart
[Thu Jan 23 16:36:29.710822 2020] [mpm_prefork:notice] [pid 26147] AH00163: Apache/2.4.38 (Raspbian) mod_fcgid/2.3.9 OpenSSL/1.1.1d configured – resuming normal operations
[Thu Jan 23 16:36:29.711196 2020] [core:notice] [pid 26147] AH00094: Command line: ‘/usr/sbin/apache2’

Oh, you’re running Raspbian?
You do know that ARM isn’t supported by Virtualmin (currently at least)?

1 Like