LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > cPanel migration - .htaccess (sus.page)

Reply
 
Thread Tools Display Modes
  #1  
Old 11-16-2006, 01:58 AM
slimak slimak is offline
Senior Member
 
Join Date: Aug 2006
Posts: 67
Default cPanel migration - .htaccess (sus.page)

Hello,
When I suspend an account, cPanel creates a .htaccess file in user public_html:
RedirectMatch .* http://serv_host_name/suspended.page/
Options -Includes -Indexes -ExecCGI
The problem is that the addons domains are still working in lsws. The addon domain root dir is: /home/$user/public_html/$domain, so the lsws isn't looking for .htaccess in /home/$user/public_html, like does it Apache.

The second problem is, when I unsuspend an account. The redirect is still working until I remove the .htaccess file by hand (cPanel leave an empty .htaccess).
Reply With Quote
  #2  
Old 11-16-2006, 09:06 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
The problem with addon domains is because the htaccess cache implemented, no easy fix, may be in 3.0 release.

I cannot reproduce the second problem, it works. LiteSpeed cache .htaccess for a few seconds, maybe you did that too fast, or it is the browser cached the page.
Reply With Quote
  #3  
Old 11-18-2006, 02:08 AM
slimak slimak is offline
Senior Member
 
Join Date: Aug 2006
Posts: 67
Default .htaccess

1. OK, when could we expect the 3.0 version? That future is very important, because without it, there is impossible to block fully account in cPanel.

2. There must be an .htaccess file in public_html before suspend - cPanel is restoring the old .htaccess when the account is being unsuspend. I waited for about 10 minutes, but still the redirection was working. When I change the modification time of .htaccess (or delete it), then the page starts working.

I have some others, less important problems:
3. Is there something like ScriptRedirectMatch in Apache? cPanel is adding below line to httpd.conf, but it doesn't work:
ScriptAliasMatch ^/cpanel/(.*) /usr/local/cpanel/cgi-sys/redirect.cgi
4. I tested the Apache mod_perl Equivalent (from Wiki) and it is working good, but it doesn't have one thing when we import the configuration from httpd.conf - suexec (like phpsuexec). I think, you may add it in future.
5. Is there possible to setup something like server-status? WHM displays Apache status by this lines:
<Location /whm-server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
ExtendedStatus On
6. And the last thing, but the most important for me. I'm selling also account without PHP/CGI (only data files) and to block the possibility of using PHP (add others) I use these lines in .htaccess:
<Directory ~ "^/home/(user1|user2|user3)/public_html">
Options -Includes -ExecCGI
RemoveType .php .php3 .php4 .phtml .phps .php5 .wmls .wmlsc .cgi .pl
AllowOverride AuthConfig Indexes Limit
</Directory>
<Directory ~ "^/home/(user1|user2|user3)/.*/cgi-bin/">
Order deny,allow
Deny from all
</Directory>
The problem is that, these lines aren't working in LSWS.

Last edited by slimak; 11-18-2006 at 02:11 AM..
Reply With Quote
  #4  
Old 11-18-2006, 10:36 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Answers to your questions:
No. 1: 3.0RC1 is expected on Monday, but blocking subdomain may not able to make it, it is a bigger change. Maybe in RC2 release.

No. 2: Fixed.

No. 3: It should work, I will check, fix should be 3.0RC1.

No. 4: Maybe in RC2 release if cannot make into RC1

No. 5: No plan for this yet. the status of LiteSpeed is completely different.

No. 6: Try to make it into 3.0RC1
Reply With Quote
  #5  
Old 11-25-2006, 06:50 AM
slimak slimak is offline
Senior Member
 
Join Date: Aug 2006
Posts: 67
2&3. OK, now it works.
5. At this time there could by only the ability to setup the LSWS status accessible from location/alias.

7. I found another inconvenience: the http isn't suspended after the bandwidth limit is reached. In Apache does that the mod_bwlimited (if file /var/cpanel/bwlimited/$domain exist, then Apache respond an error). That could by done e. g. by these rewrite rules, but I don't know how to add them to all VH:
RewriteEngine On
RewriteCond /var/cpanel/bwlimited/%{SERVER_NAME} -f
RewriteRule ^.* /_autoindex/bwlimit.html [L]

(in lsws/share/_autoindex/bwlimit.html I created file with an info for users).
Reply With Quote
  #6  
Old 11-25-2006, 07:31 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
LiteSpeed has its own status/ realtime report page in the admin page, not sure how to make it available. It just a php script parses /tmp/lshttpd/.rtreprot file.

7. We can hard code those rules into vhosts configured via httpd.conf, when bandwidth logging is set for that vhost. if there is no other better ways to do that. I wonder how cPanel adds similar rewrite rules to Apache configuration? In .htaccess file or httpd.conf?
Reply With Quote
  #7  
Old 11-25-2006, 07:43 AM
slimak slimak is offline
Senior Member
 
Join Date: Aug 2006
Posts: 67
7. By httpd.conf is loading module mod_bwlimited.so from /usr/local/cpanel/apache. You may find in this directory the mod_bwlimited.c - source of that little module.
Reply With Quote
  #8  
Old 11-27-2006, 09:11 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
We implement something similar to the rewrite rules you suggested in 3.0 release.
Reply With Quote
  #9  
Old 12-12-2006, 08:24 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Most issue listed above should have been addressed in 3.0RC1 release.
Except #4, mod_perl suexec has not been added, I think it might take too much memory in shared hosting environment, Perl uses a lot of memory.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:42 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.