apache

can some one give me a sample gzip code for htaccess?

I'm keen to get started experimenting with gzip, but like i used to find php.net when i first started learning php, the apache documentation confuses me a bit. http://httpd.apache.org/docs/2.0/mod/mod_deflate.html I'd really appreciate a sample htaccess file to have a look at if anyone's got one? Also are there things which should be c...

SE friendly URLs appache code snippets

I want example.com/23-45 be transformed to example.com?id=23-45 Could you please post the code I should add to .htaccess file to make this work (Is this everything I should do to make this work - add a piece of code to .htaccess file ???) Thanks a lot! ...

How do I configure Apache to handle missing image assets?

All the image assets in my Rails application live in /public/images and are served by Apache if they exist on the server. If a request for a missing image is made, Apache can't serve it so it gets passed on to Rails which subsequently raises a 404. Ideally I would like any request for a missing image to be handled at the Apache level, ...

Standard Apache (not OHS) with mod_osso for Single Signon

The mod_osso.so (the Apache plugin for Single Signon, provided by Oracle) is distributed with the Oracle HTTP Server (OHS), which is essentially a modified Apache. I am trying to use it on the standard Apache HTTP Server, and have not managed to get it to work. Configuration: Apache 2.2.15 OHS from the Oracle Web Tier Tools 11.1.1.2....

NullPointerException while raise an embedded ldap server using spring

Hello, I'm trying to raise the Spring Embedded Ldap Server using: But I'm keep on getting this exception: 2010-06-10 14:33:35,559 ERROR main ApacheDSContainer start - Server startup failed java.lang.NullPointerException at org.apache.directory.server.core.schema.DefaultSchemaService.initialize(DefaultSchemaService.java:382) ...

Close HTTP connection from within Apache filter

Hi, I'm trying to build an Apache filter that will allow the server to only take as many bytes of an incoming POST file upload as it needs. I want it to acknowledge the client with a 200 OK and close the connection after a certain defined delimiter has been detected in the request stream. I'm just starting with Apache filters, and modu...

mercurial hg - pushing to a cloned repositor via APACHE errors with "repository is unrelated"

Two scenarios, one work one doesn't when they both should: Scenario #1: (DOES NOT work via apache) 2 repos on Server SERVER: Repo "A", Repo "B" cloned from repo A via http://SERVER/HG/A On client: Repo A cloned from http://SERVER/HG/A Repo B cloned from http://SERVER/HG/B Added a file to repo A...

Python subprocess: Cannot allocate memory (after a few days of not restarting apache)

I use check_call('convert ...', shell=True) to open the process. This is run inside apache. I start getting this exception after a few days: File "/usr/lib/python2.6/subprocess.py", line 457, in check_call retcode = call(*popenargs, **kwargs) File "/usr/lib/python2.6/subprocess.py", line 444, in call return Popen(*popenar...

Apache Hosted Web Service Doesn't Handle TRemotable classes.

I started with an ISAPI DLL which I created with Delphi 2009, This module perform as expected when runnining in ISS 5.1 on Windows XP. This same module when hosted using Apache 2.2.15 and mod_isapi does not function correctly. To eliminate the possibility that the mod_isapi has some flaw, an Apache Shared Object module of the same servic...

Apache Deflate - does it wait for the whole page to load first?

I set up a server to use the Apache2 deflate recently. Some people started reporting long waiting times on certain pages. The page in particular is one that takes a long time to load, as it's gathering data from external sources. Usually it loads progressively, which is good for user feedback. The whole page can take 10-15 seconds to f...

Selective SSL with .htaccess force http:// or https://

I am trying to be more selective in which pages/requests are using SSL for performance reasons. I would like to use htaccess to redirect to https:// for only the required pages and redirect back to http:// for everything else. This is what I have: RewriteEngine On # force https RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^(.*)/(abc|x...

support for rewriteRule in cookie flag

I'd like to use $1 in the [cookie] flag of RewriteRule. I want to create a cookie with a part of the request URL as in the following: RewriteRule ([0-9]*)/*. - [CO=cookieName:$1:example.com] for example: If the request url is: http://www.example.com/1234, i want to set a cookie name cookieName with the value 1234 it seems no cookie i...

Rewriting subdomain to subfolder with htaccess

I'm attempting to use .htaccess in the root folder of an Ubuntu/Apache2 server in order to mask a subdomain to subfolder and I keep getting a 500 Internal Error. I know that I'm doing something stupidly wrong and it is some silly error causing the problem. I've checked all of the similar threads on SO and online and whenever I try their ...

File upload from standalone client

Is is applicable to use Apache FileUpload lib to to upload files to Glassfish v2 server using standalone client? If yes, what are the differences for this purpose? ...

Does FastCGI support PHP 5.3.2 centOS?

I just upgrade the PHP version in my VPS to 5.3.2 I used FastCGI and worker MPM in php 5.1.2 or 5.2.1 I forgot, it worked fine, and it was so fast, I like it. After I upgrade the PHP version, it gives me Internal Server Error 500 on all .php pages. What is wrong? does FCGI support php 5.3.2? If yes, there should be some differences in...

working on django development server but not on apache

i am facing an issue with the apache server, we have written the code, in which if the url entered in the form field is valid it will display an error message, when i run the code through django developement server it works fine, displays the error message, but when running through apache, then does not show the error message just return...

Strip part of the URL for every request - Apache

Hi, this is the first bit of apache rewriting I've done, so hopefully it's an easy one for the experts out there. I have a website which for this example would have 3 pages: www.example.com/appname/page1 www.example.com/appname/page2 www.example.com/appname/page3 I want to hide the appname from the person browsing the site for every ...

Apache redirect based on host and uri

I have a fairly simple redirect rule setup in my Apache vhost. <VirtualHost *:80> ServerName mobile.foo.com ServerAlias *.foo.com RewriteEngine On RewriteCond %{HTTP_HOST} ^(.*)\.foo\.com$ RewriteRule ^(.*)$ http://mobile.bar.com/foo [R=301,L] </VirtualHost> I want to add another condition based on the request uri...

Automatically authenticating windows users on an apache/Linux server

If I wanna authenticate windows accounts to AD when a user browses to an apache-running site on a Linux server, here are the usual suspects:   List item mod_ntlm (which I used in a distant past) - last update on 2003 mod_auth_ntlm_winbind - last update on 04/2007 mod_auth_kerb - last update on 12/2008 No luck getting any of those to ...

What's wrong with this .htaccess rewrite

Hi guys, I spend a lot of time trying to figure out what's wrong with this .htaccess rewrite with no success. It produces a "500 Internal Server Error" :( RewriteEngine On RewriteCond %{REQUEST_URI} ^/(([^/]+/)*)gallery/ RewriteCond %{DOCUMENT_ROOT}%1gallery/cache/$0 -f RewriteRule ^.+ cache/$0 [L] RewriteCond %{REQUEST_FILENAME} !-f...