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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > Context-level problems setting custom HTTP headers

Reply
 
Thread Tools Display Modes
  #1  
Old 04-03-2007, 06:18 AM
Marcus Marcus is offline
Senior Member
 
Join Date: Feb 2007
Posts: 69
Default Context-level problems setting custom HTTP headers

Hi,

I'm having problems trying to make some settings work on a context level. Specifically, I'm trying to set the Expires headers and add some HTTP headers of my own.

I've set up a static context, and set the URI to the folder (relative to the doc root) of where the folders are. The files are set to accessible, I've selected Enable Expires, and put an entry of application/json=A10. The MIME type for JSON files is in the main server mime-types file. I've also added "x-Content: nothing" (without the quotation marks) in the 'Extra Headers' section.

Neither of these settings appear to make any difference. I know the context is recognized in part, because when I set the accessible to 'no', I get 403 errors. I also know that the Enable Expires settings works on a server and VH level, since I've checked them there and they appear in the responses. It's just on a context level. I've had a go trying to get .htaccess files working, but that didn't work either - but I don't want to use them anyway, so I'd rather try to get things sorted on a context level.

Any ideas?

Thanks in advance for any responses.
Reply With Quote
  #2  
Old 04-03-2007, 01:06 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Plase check your error.log, your context configuration may not go through at server startup time.

It works on our test server with a 3.0.1 installation.
Reply With Quote
  #3  
Old 04-03-2007, 04:08 PM
Marcus Marcus is offline
Senior Member
 
Join Date: Feb 2007
Posts: 69
Default Problem solved

The problem was my understanding of the documentation. I did not realize that the 'root' was the full path to the folder - I thought that if the URI was relative to the document root, then it could be left blank (as was suggested in the documentation), but in fact it appears that for a path relative to the $DOC_ROOT, you still need to do the path, but can use '.' (e.g. ./path/to/folder ). It's all working fine now, however I don't feel it was particularly clear in the documentation - something to look at perhaps.

One other slightly confusing thing with the documentation is the fact that different names are used for the same setting. In the online documentation, the term 'root' is used. In the configuration file, and the admin setup, the term 'location' is used. On the same page covering context online, the term 'location' is used for a different setting, relating to Java.

I appreciate that you've been busy getting version 3 up and running, and I commend you on an excellent product, but when you have time, it might be an idea to take a look at your online documentation and check that each section correctly corresponds to the latest version, and that they cover all the main mistakes that people might make.

Thanks again for your support.
Reply With Quote
  #4  
Old 04-03-2007, 09:35 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,583
Yeah, the documentation need some improvements.
We are looking to hire a good technical writer for this kind of job. Hopeful, we will find one soon.
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:25 AM.



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