[Resolved] vhost/httpd conf error - directadmin & litespeed

Status
Not open for further replies.
#1
Hi,

After the installation from litespeed via Directadmin I get some errors regarding vhost conf with my ipv6 adres, how & where can I fix this?

/usr/local/directadmin/data/users/admin/httpd.conf:21] Listener for ...
Schermafbeelding 2017-03-18 om 21.17.05.png
 

NiteWave

Administrator
#2
can you post the listener definition part around /usr/local/directadmin/data/users/admin/httpd.conf:21 ?
 
Last edited by a moderator:
#3
Ofcourse:
Code:
<VirtualHost 79.170.93.244:80 [2a02:348:39:5df4:0:0:0:1]:80 >
   ServerName www.effectivahosting.nl
   ServerAlias www.effectivahosting.nl effectivahosting.nl
   ServerAdmin webmaster@effectivahosting.nl
   DocumentRoot /home/admin/domains/effectivahosting.nl/public_html
   ScriptAlias /cgi-bin/ /home/admin/domains/effectivahosting.nl/public_html/cgi-bin/
   UseCanonicalName OFF
   <IfModule !mod_ruid2.c>
     SuexecUserGroup admin admin
   </IfModule>
   CustomLog /var/log/httpd/domains/effectivahosting.nl.bytes bytes
   CustomLog /var/log/httpd/domains/effectivahosting.nl.log combined
   ErrorLog /var/log/httpd/domains/effectivahosting.nl.error.log
   <Directory /home/admin/domains/effectivahosting.nl/public_html>
     php_admin_flag engine ON
     php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@effectivahosting.nl'
     php_admin_value mail.log /home/admin/.php/php-mail.log
     php_admin_value open_basedir /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php70/lib/php/
   </Directory>
</VirtualHost>
 
Last edited by a moderator:

NiteWave

Administrator
#4
please confirm:
1. [2a02:348:39:5df4:0:0:0:1] already assigned on this server
can check with
Code:
#ip a
2. when you switch to apache, does it show any errors ?
 
Last edited by a moderator:
#5
Hi,

1. The result:
Code:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
  valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host
  valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
  link/ether da:00:03:91:05:5b brd ff:ff:ff:ff:ff:ff
  inet 79.170.93.244/24 brd 79.170.93.255 scope global eth0
  valid_lft forever preferred_lft forever
  inet6 2a02:348:39:5df4::1/48 scope global
  valid_lft forever preferred_lft forever
  inet6 fe80::d800:3ff:fe91:55b/64 scope link
  valid_lft forever preferred_lft forever
2. Do you mean deactivate litespeed & activate apache via custombuild or a other setting in litespeed which is based on apache config?
 
Last edited by a moderator:

NiteWave

Administrator
#6
1. looks like IP is ok.

2. yes. since litespeed is apache drop-in. it'll read and parse apache's httpd.conf.
stop litespeed and start apache, to see if any error message which will complain about VirtualHost 79.170.93.244:80 [2a02:348:39:5df4:0:0:0:1]:80
 
Last edited by a moderator:
#7
1. Good to hear.

2. Ah ok, I've did that & found the following:
With lightspeed I get errors around:
Code:
php_admin_flag engine ON
     php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f admin@effectivahosting.nl'
     php_admin_value mail.log /home/admin/.php/php-mail.log
     php_admin_value open_basedir /home/admin/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php71/lib/php/
Errors like:
Code:
AH00526: Syntax error on line 19 of /usr/local/directadmin/data/users/admin/httpd.conf:
Invalid command 'php_admin_flag', perhaps misspelled or defined by a module not included in the server configuration
Without lightspeed everything looks OK

Should I remove these lines? But then PHP doesn't work anymore?
 
Last edited by a moderator:

NiteWave

Administrator
#8
please try : add <IfModule litespeed> </IfModule> to enclose above 4 lines of php_admin_ directives, see if the error messages will be gone.
 
Last edited by a moderator:

NiteWave

Administrator
#9
for ipv6 error, copied from ticket reply by one of our staff:
Code:
It was due to the fact that in httpd.conf and httpd-ssl.conf it was not listening on IPv6 only IPv4.

I added the following:
/etc/httpd/conf/httpd.conf
Listen [::]:80
Listen 0.0.0.0:80

/etc/httpd/conf/extra/httpd-ssl.conf
Listen [::]:443
Listen 0.0.0.0:443
 
#10
I've added the ifmodule & that works. :)

+ I've created a permanent fix by creating custom virtual host files:

https://help.directadmin.com/item.php?id=2
Code:
/usr/local/directadmin/data/templates/custom/virtual_host2.conf   *** Custom Template ***
/usr/local/directadmin/data/templates/custom/virtual_host2_secure.conf   *** Custom Template ***
/usr/local/directadmin/data/templates/custom/virtual_host2_sub.conf   *** Custom Template ***
/usr/local/directadmin/data/templates/custom/virtual_host2_secure_sub.conf   *** Custom Template ***
/usr/local/directadmin/data/templates/custom/user_virtual_host.conf   *** Custom Template ***
& made code changes like:

Code:
|*if CLI="1"|
  <IfModule litespeed>
  php_admin_flag engine |PHP|
  php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f |PHP_EMAIL|'
  |CLI_PHP_MAIL_LOG|
  </IfModule>
|*endif|
|*if OPEN_BASEDIR="ON"|
  <IfModule litespeed>
  php_admin_value open_basedir |OPEN_BASEDIR_PATH|
  </IfModule>
|*endif|
Now if I build rewrite_configs everything keeps working
 
Last edited by a moderator:
Status
Not open for further replies.
Top