apache

How do I get apache RewriteRule working correctly for a subdomain?

I just setup a subdomain with the following RewriteCond: RewriteCond $1 !^search.php$ RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^/?([^/]+)$ search.php?q=$1 [L,NS] I'm using the same rewrite condition on my main domain and it works perfectly. However, when I set it up on the subdomain, it simply outputs "index.php" when going...

Apache2 httpd.conf help

I have a domain, for example, http://example.com. It is already configured to point to /var/www/ Basically, i want http://example.com to point to /var/www/4.0/ and http://example.com/foobar/ to point to /var/www/moo/ How can I do this with the httpd.conf file for Apache2? Thanks ...

mod_deflate Supported Encodings for Compression

It seems to me, that mod_deflate in Apache 2.2 will always return: Content-Encoding: gzip and never: Content-Encoding: deflate It was explained to me, that although there may be a deflate algorithm, mod_deflate is named after a file-format, in which the algorithm could be any of: gzip, bzip. pkzip Of those three, mod_deflate provid...

Do I want an embedded web-server, or what?

So, someone want me to hack some code for him. He has a 42" TFT display on which he will display some application/business related data. However, 75% of the screen real estate is unused, so he wants to fill it with "TV/adverts/flash/you know, that kind of thing... web based....". Any advice? Do I want an embedded web-server? If so, wh...

Apache loads any file that begins with the same string as used in url. How to prevent this?

If I point to: mywebsite.com/search and there is a file called search.php or search.html or search.inc.php or search.whatthehell.php in website's directory, Apache will point to that file instead of 404'ing. What is even more annoying is that if I point to: mywebsite.com/search/string?also=whatever Apache will still display any file...

How to give different expires header for files in different folders with one .htaccess in root ?

I want to give different expiry headers to different images on my site. they are contained in different folders right now, what I want to do is give then different expires headers with one main .htaccess file. I know this can be done with multiple .htaccess files in those folders but I dont want it to be implemented that way, It will cle...

Apache Rewrite Excluding Assets Directory

Hi all I'm writing a mini-MVC application. App architecture: actions/ templates/ site/ app/ styles/ images/ scripts/ So far, I've got a controller working properly, taking in all requests. However, javascript files are not being rendered properly in the browser; I'm getting a 404 Not Found when I try to load the ...

Apache complex regex crashing with 500 error

I have been working with an existing website out company has running until I finish developing the new site. I've been asked to add some additional functionality to booking pages that will automatically set a booking button based on passed parameters. The existing working regex is as follows: RewriteRule ^.+-(\d+)\.accommodation$ prop...

Multiple Trac projects

I'm building an integrated system where I am using Trac for wiki support running on apache webserver 2.2 with mod_wsgi. I had this idea to have a folder structure that is not \Trac\Project but something a little more complex. I want my filesystem structure to be like: -Trac -SomeContext -... -Project1 -Project2 -S...

Are Apache Environment Variables "request safe"?

I have my Apache web server fronting a Rails application. When a request comes in one of the Apache modules looks at the request and puts information into an Apache environment variable. My question is, is there a chance that one request can overwrite the environment variable of another request and have things get mixed up in the Rails l...

SVN multiple repositories in subfolders

I'm using apache+svn apache config file: LoadModule dav_module modules/mod_dav.so LoadModule dav_svn_module modules/mod_dav_svn.so LoadModule authz_svn_module modules/mod_authz_svn.so <Location /code> DAV svn SVNParentPath "c:/repositories" </Location> Imagine i have this file structure (in every t? i have one svn repository...

Deflate zlib vs. Gzip compression on apache ... how to enable.

I've read on a couple of blogs, notably here http://www.codinghorror.com/blog/2008/10/youre-reading-the-worlds-most-dangerous-programming-blog.html there are some advantages to using deflate zlib compression by comparisson to gzip one. I am trying to setup apache to only do deflate so I can run some tests. However, I am having difficult...

Apache HttpClient 4.0 Ignore SSL Certificate Errors

How to bypass invalid SSL certificate errors with Apache HttpClient 4.0? ...

PHP sessions causing Apache to hang indefinitely

The problem is that every so often a page that writes to a Session will cause apache to hang forever for a particular session. Once this error occurs for one user any further modifications to any session of any user will cause the website to hang for this user. This problem has been my sole focus for days. I have a development VPS runni...

Ajax gets nothing back from the php.

Jquery i dont have alert and firefox i dont have anything in return. The code was working before, database query have successfull records also. What i am missing??? Jquery ajax. $.ajax({ type : "POST", url : "include/add_edit_del.php?model=teksten_display", data : "oper=search } }); PHP ...

Automatically enabling an output filter in Apache module

I am developing a module for Apache which contains an output filter that I would like to always be invoked so that it can determine whether to process the request data or just pass the data along. Since I would like the module to be compatible with Apache 2.0 as well as 2.2, I do not want to use mod_filter. Ideally I would like to do th...

Single django instance with subdomains for each app in the django project

I have a django project (django+apache+mod_wsgi+nginx) with multiple apps, I'd like to map each app as a subdomain: project/ app1 (domain.com) app2 (sub1.domain.com) app3 (sub3.domain.com) I have a single .wsgi script serving the project, which is stored in a folder /apache. Below is my vhost file. I'm using a single...

Apache directives: Action broken

I have the following Apache directives to process every *.xml file on the web server: AddHandler ae_xslt .xml Action ae_xslt test.php DirectoryIndex index.xml index.php index.html The problem is that I get an internal server error (500). When I look in the Apache error logs I get the following error: Htaccess: Action takes ...

Protect files in dir .htaccess and allow access to a particular controler/action

Hi How to protect files (documents, images..) that r being sold over internet. Is it possible to Deny access to all except a particular php file that lists those documents. for instance www.mysite.com/list dir tree: + myfiles | |--img1.jpg |--doc.pdf + application |-+controllers |-lister.php Can i grant access to myfiles DIR on...

How do I edit .htaccess to allow both rails and wordpress requests?

I want to run an instance of wordpress within my rails app. I currently have wordpress files housed in public/wordpress, but I need to configure my .htaccess file to allow both types of requests. How do I do that? currently, .htaccess is: General Apache options AddHandler fcgid-script .fcgi RewriteEngine On RewriteRule ^$ index.html [QS...