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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > [Solved] Litespeed not reading .htaccess file

Reply
 
Thread Tools Display Modes
  #1  
Old 06-29-2012, 01:15 PM
optize optize is offline
Senior Member
 
Join Date: Feb 2010
Posts: 121
Default [Solved] Litespeed not reading .htaccess file

cPanel uses the following alias:

Alias /bandwidth /usr/local/bandmin/htdocs/

/usr/local/bandmin/htdocs/.htaccess has a username/password auth

However, it's not reading it, here is the Directory listing that would apply to that directory:

<Directory "/">
Options ExecCGI IncludesNOEXEC Indexes SymLinksIfOwnerMatch
AllowOverride All
</Directory>

My apache servers which the same config work fine, so kinda odd.

Does Litespeed NOT read .htaccess files in this directory for some reason?
Reply With Quote
  #2  
Old 06-29-2012, 01:17 PM
optize optize is offline
Senior Member
 
Join Date: Feb 2010
Posts: 121
It looks like it's related to the virtualhost, not path.

Anything over the main server domain isn't being read by .htaccess.

Thoughts?
Reply With Quote
  #3  
Old 06-29-2012, 03:13 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,390
check their ownership and permission
Quote:
ls -ld /usr/local/bandmin/htdocs
ls -l /usr/local/bandmin/htdocs/.htaccess
Reply With Quote
  #4  
Old 06-29-2012, 03:14 PM
optize optize is offline
Senior Member
 
Join Date: Feb 2010
Posts: 121
drwxr-xr-x 2 root wheel 4096 Nov 21 2011 /usr/local/bandmin/htdocs/
-rw-r--r-- 1 root root 93 Dec 23 2010 /usr/local/bandmin/htdocs/.htaccess
Reply With Quote
  #5  
Old 06-29-2012, 03:22 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,390
Quote:
Originally Posted by optize View Post
It looks like it's related to the virtualhost, not path.

Anything over the main server domain isn't being read by .htaccess.

Thoughts?
Can you elaborate this?
Reply With Quote
  #6  
Old 06-29-2012, 03:23 PM
optize optize is offline
Senior Member
 
Join Date: Feb 2010
Posts: 121
Quote:
Originally Posted by webizen View Post
Can you elaborate this?
Sure.

Let's say my server name is blah1.server.com. Anything on http://blah1.server.com doesn't read .htaccess it appears...

So, my .htaccess on http://blah1.server.com/~username doesn't read .htaccess.
Reply With Quote
  #7  
Old 06-29-2012, 03:25 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,390
What about HTAccess (Admin Console => Configuration => Server => General)? Make sure everything is checked except for None.
Reply With Quote
  #8  
Old 06-29-2012, 03:28 PM
optize optize is offline
Senior Member
 
Join Date: Feb 2010
Posts: 121
Quote:
Originally Posted by webizen View Post
What about HTAccess (Admin Console => Configuration => Server => General)? Make sure everything is checked except for None.
Correct, htaccess files are working for other domains.
Reply With Quote
  #9  
Old 06-29-2012, 06:36 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,390
tested in our lab:

1. subdomain (blah1.server.com) is ok. password promoted
2. alias (blah1.server.com/bandmin) is ok. password prompted.

you can enable debug logging (Admin Console => Configuration => Log => Log Level: DEBUG; Debug Level: Low)

if working, it should show something like 401 unauthorized as shown below:

Quote:
2012-06-29 19:53:08.740 [NOTICE] [10.8.0.6:63420-0#APVH_test1.server.com] Content len: 0, Request line: 'GET /bandmin/style.css HTTP/1.1'
2012-06-29 19:53:08.741 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] Find .htaccess context with URI: [/bandmin/], location: [/usr/local/bandmin/htdocs/]
2012-06-29 19:53:08.741 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] [REWRITE] Rewrite engine is not enabled for context '/'
2012-06-29 19:53:08.741 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] processContextPath() return 0
2012-06-29 19:53:08.742 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] checkAuthentication() return 22
2012-06-29 19:53:08.742 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] processNewReq() return 22.
2012-06-29 19:53:08.742 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] HttpConnection::sendHttpError(),code=401 Unauthorized
2012-06-29 19:53:08.742 [DEBUG] [10.8.0.6:63420-0#APVH_test1.server.com] redirect to:
URI=[/401.shtml],
QueryString=[]
Reply With Quote
  #10  
Old 07-02-2012, 09:45 AM
optize optize is offline
Senior Member
 
Join Date: Feb 2010
Posts: 121
2012-07-02 09:44:35.856 [DEBUG] [x.x.x.x:39055-0#APVH_199.96.x.x_cp21.xxx.com] [REWRITE] Rewrite engine is not enabled for context '/'
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 02:19 AM.



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