cPanel 11.25 issues editing .htaccess files

MikeDVB

Well-Known Member
#1
I'm getting this error as of going go 11.25 and while the last two lines may very well be a cPanel issue the first 2 concern me as far as LSWS.

Code:
Apache detected an error in the Rewrite config.
/usr/local/apache/bin/httpd: line 17: /usr/local/lsws/logs/ap_cmd_param.log: Permission denied
/usr/local/apache/bin/httpd: line 19: ulimit: virtual memory: cannot modify limit: Operation not permitted
Syntax error on line 320 of /home/account/public_html/.htaccess.ibn1it3wPyFLdWma2iFNh28BBcfu5Hu4:
RewriteCond without matching RewriteCond section
Edit: I confirmed this is only occuring on LiteSpeed powered servers at least as far as my testing but I'm going to continue doing more.
 
Last edited:

mistwang

LiteSpeed Staff
#2
Code:
Apache detected an error in the Rewrite config.
/usr/local/apache/bin/httpd: line 17: /usr/local/lsws/logs/ap_cmd_param.log: Permission denied
/usr/local/apache/bin/httpd: line 19: ulimit: virtual memory: cannot modify limit: Operation not permitted
Syntax error on line 320 of /home/account/public_html/.htaccess.ibn1it3wPyFLdWma2iFNh28BBcfu5Hu4:
RewriteCond without matching RewriteCond section
Looks like cPanel is running /usr/local/apache/bin/httpd as a non-root user and trying to verify the syntax of configuration. those above errors should not hurt anything and can be ignored.
 

MikeDVB

Well-Known Member
#3
I wouldn't think so but it fails to modify the .htaccess correctly and as such many of the features of cPanel (password protected directories, rewrite configuration, etc) all don't work because of this.

I'm more than happy to pass this onto cPanel but they will just say it's a LiteSpeed issue and tell me to resolve it with you.

Not to mention I duplicated these accounts to a non-LiteSpeed cPanel server (Apache) and it all works perfectly.
 
Last edited:

MikeDVB

Well-Known Member
#5
I've made the changes and this is what I got when trying to add a redirect:

Code:
Apache detected an error in the Rewrite config.

/usr/local/apache/bin/httpd: line 17: /usr/local/lsws/logs/ap_cmd_param.log: Permission denied
Syntax error on line 320 of /home/account/public_html/.htaccess.Nmei0O0SkNTRPGeMqcYO4mlgdmrl72Ah:
RewriteCond without matching RewriteCond section

Please try again.
Also I got this while restarting LiteSpeed:
Code:
root@demeter [/home/account/public_html]# /scripts/restartsrv_httpd
[OK] Send SIGUSR1 to 11969
[OK] Leased license key 1 will expire in 28 days!
[OK] lshttpd: pid=13569.
/usr/local/apache/bin/httpd: line 38: 0=0: command not found
httpd (pid 13588) already running
/usr/local/apache/bin/httpd: line 72: syntax error near unexpected token `fi'
/usr/local/apache/bin/httpd: line 72: `    fi'
I reverted the file and the issue on restart went away but either way adding redirects or anything that edits .htaccess is still not working.

I'm more than happy to give you access if you want to look into this, PM me.
 
Last edited:

mistwang

LiteSpeed Staff
#6
We tried adding a redirect in cPanel 11.25 in our lab. it is working fine.
The real problem in your case, is the error about rewrite rule, you should fix the rewrite rule manually, then you should be able to added the rewrite.

cPanel completely ignore the first two error/warnings.
 

MikeDVB

Well-Known Member
#7
We tried adding a redirect in cPanel 11.25 in our lab. it is working fine.
The real problem in your case, is the error about rewrite rule, you should fix the rewrite rule manually, then you should be able to added the rewrite.

cPanel completely ignore the first two error/warnings.
What I am primarily asking is for a way to either keep the LiteSpeed related errors from showing up in that window or from happening at all so that when we contact cPanel support to get this issue resolved they don't immediately go "We don't support LiteSpeed Servers"

I am sure you are quite familiar with cPanel and other providers/script developers being anti LiteSpeed due to their lack of understanding on how the product works.
 

mistwang

LiteSpeed Staff
#8
We will take care of the litepseed related error in next release.
If the rewrite rule is corrected, cPanel will not show any error messages at all, the litespeed related error is not the reason why you cannot add a redirect at all, it is the by product of the rewrite rule error, and it does not really affect cPanel functionality in any way.
 
Top