Solved [DA 1.63.1] After a new DA installation with auto mode, apache is not running. httpd: Syntax error on line 222 of /etc/httpd/conf/httpd.conf:

MaXi32

Verified User
Joined
Jul 25, 2016
Messages
657
Location
The Earth
Installing directadmin 1.63.1 (not beta) by just triggerring DA installation with auto mode:

Code:
bash <(curl -Ss https://www.directadmin.com/setup.sh || wget -O - https://www.directadmin.com/setup.sh) auto


and apache is not working with the following message (tried to rebuild but the same error happen):


Code:
systemctl status httpd
● httpd.service - The Apache HTTP Server
     Loaded: loaded (/etc/systemd/system/httpd.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Tue 2021-11-09 08:39:24 +08; 36min ago
   Main PID: 218502 (code=exited, status=1/FAILURE)
        CPU: 23ms

Nov 09 08:39:24 hostname.server.com ystemd[1]: Starting The Apache HTTP Server...
Nov 09 08:39:24  hostname.server.com httpd[218502]: httpd: Syntax error on line 222 of /etc/httpd/conf/httpd.conf: Syntax error on line 23 of /etc/httpd/conf/extra/httpd-vhosts.conf: Could not open configuration file /etc/httpd/conf/ips.conf: No such file or directory
Nov 09 08:39:24  hostname.server.com systemd[1]: httpd.service: Main process exited, code=exited, status=1/FAILURE
Nov 09 08:39:24  hostname.server.com systemd[1]: httpd.service: Failed with result 'exit-code'.
Nov 09 08:39:24  hostname.server.com systemd[1]: Failed to start The Apache HTTP Server.


When I try to rebuild apache it was just stuck with this message:

Code:
root@sun:~# /usr/local/directadmin/custombuild/./build apache
Enabling http2 in directadmin.conf.


I wish to have fewer issues like this, especially new installation for production. You guys should test this before release because this is not even a beta release or using custom install.

My operating system:

Debian 11


Code:
Compiled on 'Linux 64-bit'
Compile time: Nov  7 2021 at 10:40:59
Timestamp: '1636281653'
Compiled with IPv6
Static binary: yes
commit sha: 855dac374a755307b35526a1b2d9f4327e03fac7
OS slug: linux_amd64
package: directadmin_855dac374a755307b35526a1b2d9f4327e03fac7_linux_amd64.tar.gz
gettext support: yes
gettext path: /usr/local/directadmin/data/lang
 
I have tested this 3 times installation and still facing the same problem. So now, I got a question, is it possible to change the version to previous version eg: 1.63 during installation? or anything that I can downgrade to test this so it will work perfectly? @smtalk @fln @scriptkitty @DirectAdmin Support @karolis

Or any hint to this issue so I can try to think about creating a workaround?
 
Tested another new installation this is confirmed has issue

I will send a ticket later

Updated
Tested in Debian 10 right now (same error)

1636442431531.png



My today's job is becoming a software tester in DA to bypass this installation :cool:

Waiting for response guys. Ticket was already sent.
 
Last edited:
Ok, I think I might found the issue, after install I have to manually trigger the systemctl restart httpd to resolve this issue. Weird but yeah it's ok now for auto installation. Shouldn't the installer do this for us? Did not have this issue before.
 
Last edited:
Updated I think this still has an issue (with web server) after I switched to nginx_apache, it just stuck with this line below with no other output:

Code:
root@li2006-194:~# /usr/local/directadmin/custombuild/./build set webserver nginx_apache
Changed webserver option from apache to nginx_apache
root@li2006-194:~# /usr/local/directadmin/custombuild/./build update
root@li2006-194:~# /usr/local/directadmin/custombuild/./build nginx_apache
Enabling http2 in directadmin.conf

EDIT: I need to run the./build nginx_apache 2 times and it's now building the nginx_apache


Updated:

now the build nginx_apache stuck here (no other output after the word 'Make complete')

Code:
make[2]: Entering directory '/usr/local/directadmin/custombuild/httpd-2.4.51/support'
/usr/local/directadmin/custombuild/httpd-2.4.51/srclib/apr/libtool --silent --mode=compile gcc  -pthread  -I/usr/local/include    -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I. -I/usr/local/directadmin/custombuild/httpd-2.4.51/os/unix -I/usr/local/directadmin/custombuild/httpd-2.4.51/include -I/usr/local/directadmin/custombuild/httpd-2.4.51/srclib/apr/include -I/usr/local/directadmin/custombuild/httpd-2.4.51/srclib/apr-util/include -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/aaa -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/cache -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/core -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/database -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/filters -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/ldap -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/loggers -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/lua -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/proxy -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/http2 -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/session -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/ssl -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/test -I/usr/local/directadmin/custombuild/httpd-2.4.51/server -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/md -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/arch/unix -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/dav/main -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/generators -I/usr/local/directadmin/custombuild/httpd-2.4.51/modules/mappers  -prefer-non-pic -static -c suexec.c && touch suexec.lo
/usr/local/directadmin/custombuild/httpd-2.4.51/srclib/apr/libtool --silent --mode=link gcc  -pthread  -I/usr/local/include      -L/usr/local/lib -o suexec suexec.lo
make[2]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.51/support'
make[1]: Leaving directory '/usr/local/directadmin/custombuild/httpd-2.4.51'
Make complete

I got a weird error here on both the production and test server. Again I repeat again .. this is a new install. Hope you can look into this issue (already sent a ticket few hours back).
 
Last edited:
OK! as usual issue was related to mirror. The files-sg.directadmin.com has bug in package but files1.directadmin.com is OK. So, last time I heard that mirror always updated within few hours but this mirror always have issue. So as always DA is not smart enough to switch my installer to use singapore mirror and it has the bug! Switching to files1.directadmin.com and I have no more issue. I also ever asked question about mirror and doesn't seem like you are interested to give feedback about this:

 
Hi @MaXi32, thanks for report. We will release a hot-fix soon.

We did not expect minor update might cause installation issues. We really appreciate your report.
 
Hi @MaXi32, thanks for report. We will release a hot-fix soon.

We did not expect minor update might cause installation issues. We really appreciate your report.
It's working now if you can access into the test server, both nginx and apache is running fine but like I said this should not happen that I should manually restart the web server but this workaround is enough to continue my project.
 
I have tested this 3 times installation and still facing the same problem. So now, I got a question, is it possible to change the version to previous version eg: 1.63 during installation? or anything that I can downgrade to test this so it will work perfectly? @smtalk @fln @scriptkitty @DirectAdmin Support @karolis

Or any hint to this issue so I can try to think about creating a workaround?
You can perform installation for stable branch with command:

Code:
bash <(curl -Ss https://www.directadmin.com/setup.sh || wget -O - https://www.directadmin.com/setup.sh) auto stable

or just:

Code:
setup.sh auto stable

If you have DA scripts already downloaded.

Edit: fixed commands, initial post had `auto` parameter missing.
 
Last edited:
@MaXi32 yes initial command did have a typo, it was missing auto paramter. I have edited my previous post to avoid someone else tripping on this. Please try:

Code:
bash <(curl -Ss https://www.directadmin.com/setup.sh || wget -O - https://www.directadmin.com/setup.sh) auto stable

or

Code:
setup.sh auto stable
 
Code:
setup.sh auto stable

Thanks for your reply @fln.

From what I understand, the auto mode above will also include CSF installation. Let say if I don't want to automatically install CSF (I will manually do that later).

So I only have 2 questions regarding the command above:

1) How can I apply the 'stable' argument without installing CSF? Is it possible?

2) Can I use 'auto stable' arguments above and at the same time provide options.conf that also allow customization like changing webserver to nginx_apache during directadmin installation? At this moment I can answer this 2nd question by trial and error (that would take time) but would like to get confirmation about this and reduce the time to test.


Sorry, this is a bit off-topic question on the issue. I promise you the 2 questions above are the last questions in this thread.
 
Last edited:
hmmm the easiest way would be to download the setup.sh script and just remove CSF installation section:

Code:
wget https://www.directadmin.com/setup.sh

# edit setup.sh and remove the following section
#CSF if AUTO
if [ "${OS}" != "FreeBSD" ] && [ "${AUTO}" = "1" ]; then
        // DELETED
        ${BUILD} secure_php
fi

# you can leave "${BUILD} secure_php" line.


# start installation with:
sh setup.sh auto stable
 
It seems setup.sh gathered a lot of cruft over time. Since last release issue with installation script prompted us about its complexity we are revisiting it and hopefully be able to make the installation simpler.

Script setup.sh is not designed for great flexibility and mostly oriented in starting with good defaults. Are you looking into automating customized DA installations?
 
Are you looking into automating customized DA installations?

Yes but using stable channel for production. I'm trying to avoid the current channel right now. Normally I know how to do customization, providing options.conf and trigger the setup like this:

./setup.sh "${CLIENT_ID}" "${LICENSE_ID}" "${HOSTNAME}" "${INTERFACE_ETH}" "${IPV4}"

But, as you mentioned about putting 'auto stable' argument, I'm not sure where to put this 'stable' argument alone without auto in my current setup above. The main objective is to avoid installing CSF and have customized packages in options.conf like I normally did before.

The reason here is like what most server admins need: I'm trying to speed up an installation using my custom installation like providing the first nginx_apache during installation. I can rebuild ngginx_apache later after it has finished installation using auto mode but that would take a lot of time.

So, you are asking the right question here.
 
Last edited:
There is no built-in mechanism of changing the channel for non auto installs via CLI arguments. But the channel is controller by a variable at the beginning of the script. We actually assumed non auto install mode is rarely used.

Hmm, you can force different download channel with sed 's|DOWNLOAD_CHANNEL="current"|DOWNLOAD_CHANNEL="stable"|'.

Over time auto install mode got extra features, like non interactive pre-installation of packages, fastest mirror detection, CSF, custombuild secure_php.
 
Thanks @fln for your helpful answer. Marking this post as solved because I got a response this issue has been fixed.
 
Back
Top