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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > [solved] Auto Index not working

Reply
 
Thread Tools Display Modes
  #11  
Old 03-06-2012, 10:23 AM
aheadley aheadley is offline
New Member
 
Join Date: Mar 2012
Posts: 8
Adding "AddType application/x-httpd-php .php" to the .htaccess file made no difference. Also, requests for regular PHP files (like example.com/ai-test/test.php) work fine, as in they are properly run through PHP, even without the AddType line. It's just the auto-index script builtin to LS that has this problem. Additionally, the "Content-Type: handler/x-httpd-php" header is causing the browser to throw up a file download prompt but I think we forgot to mention that the contents of that file are the un-interpreted auto-index PHP script.
Reply With Quote
  #12  
Old 03-06-2012, 04:05 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
You have this in your vhost conf. That's why suggest earlier to add "AddType application/x-httpd-php .php" in .htaccess to override it.
Quote:
2012-03-06 11:36:53.727 [DEBUG] [/etc/httpd/conf.d/vhost_example.com.conf:34] processing direcitve: AddHandler x-httpd-php .php
Are you saying http://example.com/ai-test/test.php is ok (php serves) but http://example.com/ai-test/ (default.php) is not? Comment out the "AddHandler" pointed out above and see any difference.
Reply With Quote
  #13  
Old 03-07-2012, 07:44 AM
aheadley aheadley is offline
New Member
 
Join Date: Mar 2012
Posts: 8
Quote:
Originally Posted by webizen View Post
Are you saying http://example.com/ai-test/test.php is ok (php serves) but http://example.com/ai-test/ (default.php) is not?
Yes, that's right.

Quote:
Comment out the "AddHandler" pointed out above and see any difference.
This made no difference, still getting the "Content-type: handler/x-httpd-php" header.

Also, it looks like the same thing happens on CentOS 5 servers as well.
Reply With Quote
  #14  
Old 03-07-2012, 10:37 AM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,339
pls pm server temporary access for us to look into further.
Reply With Quote
  #15  
Old 03-07-2012, 02:41 PM
aheadley aheadley is offline
New Member
 
Join Date: Mar 2012
Posts: 8
While setting up a test environment to give your root access we discovered that it was a problem with our configuration. For future reference, the issue was that these lines were missing from the apache config files (loaded by Litespeed of course):
Quote:
AddHandler php5-script .php
AddType text/html .php
Reply With Quote
  #16  
Old 03-07-2012, 04:44 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
Thanks for the update.
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 11:43 AM.



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