I configured one of DA with OpenLightspeed , imported few accounts from other servers. They are working fine however, if I create new account, I can't use PHP with it. If I check logs , I get this :
If it was Apache, could be easily managed through DA UI at Advanced Feature --> Advanced Handlers , I can see that under "System Apache Handlers" is set to
Since I don't have idea how OpenLight speed stuff is handled , can anyone point where to look to get it fixed ?
UPDATE:
While looking more into it, I got it working if I add following in .htaccess in root :
I assume, somehow new account is not set to handle PHP.
Content of /usr/local/lsws/conf/httpd-scripthandler.conf
I checked directadmin-vhost config file ie. : /usr/local/directadmin/data/users/username/openlitespeed.conf
Its scripthandler part says (if I select PHP 7.1
If I switch to PHP 7.3 from DA UI
Then why It is not working without adding AddHandler directive to .htaccess ?
Another Update
I checked /var/log/httpd/error_log found series of following errors for multiple users:
Code:
MIME type [application/x-httpd-php] for suffix '.php' does not allow serving as static file, access denied
If it was Apache, could be easily managed through DA UI at Advanced Feature --> Advanced Handlers , I can see that under "System Apache Handlers" is set to
application/x-httpd-php | .inc .php .php5 .php73 .phtml |
Since I don't have idea how OpenLight speed stuff is handled , can anyone point where to look to get it fixed ?
UPDATE:
While looking more into it, I got it working if I add following in .htaccess in root :
Code:
AddHandler application/x-httpd-php7 .php .phtml
I assume, somehow new account is not set to handle PHP.
Content of /usr/local/lsws/conf/httpd-scripthandler.conf
Code:
scriptHandler{
add lsapi:lsphp71 php
add lsapi:lsphpwebapps lsphpwebapps
}
I checked directadmin-vhost config file ie. : /usr/local/directadmin/data/users/username/openlitespeed.conf
Its scripthandler part says (if I select PHP 7.1
Code:
scripthandler {
add lsapi:lsphp71 inc
add lsapi:lsphp71 php
add lsapi:lsphp71 phtml
add lsapi:lsphp71 php71
}
Code:
scripthandler {
add lsapi:lsphp73 inc
add lsapi:lsphp73 php
add lsapi:lsphp73 phtml
add lsapi:lsphp73 php73
}
Then why It is not working without adding AddHandler directive to .htaccess ?
Another Update
I checked /var/log/httpd/error_log found series of following errors for multiple users:
Code:
2020-04-30 17:30:10.189284 [ERROR] [config:server:epsr:lsphp73] invalid path - /usr/local/php73/bin/lsphp, it cannot be started by Web server!
2020-04-30 17:30:10.760024 [ERROR] [config:server:vhosts:vhost:zap.userA-443:context:/cgi-bin/] path is not accessible: /home/userA/domains/userA.com/public_html/cgi-bin/
2020-04-30 17:30:10.761159 [ERROR] [config:server:vhosts:vhost:userB.com-80:scripthandler:add] HttpMime::addMimeHandler getHandler with name lsphp73 ret (nil)
2020-04-30 17:30:10.761195 [ERROR] [config:server:vhosts:vhost:userB.com-80:scripthandler:add] use static file handler for suffix [inc]
Last edited: