apache

Simple script to replace Apache's mod_autoindex with a user-friendly directory listing

The Apache module mod_autoindex generates "directory indexes" that show users a crude hyperlinked list of the files and directories inside a directory (when there is no index.html or other DirectoryIndex file). I have a directory on an Apache webserver where I want to provide an automatic directory listing, including the full filenames,...

Passing cookie data between iframes

Say I have a website, www.example.com, with a login box which sits in an iframe situated in api.example.com. My question is: Is it possible to pass cookie data from the inner iframe (api.example.com to the website, so the website knows when the user logged in? Is it possible to do this client-side, without the need to refresh the whole...

apache resolving urls before looking in .htaccess

I have a rewrite rule of the following form: RewriteRule ^foo/([a-zA-Z0-9]+)$ foo.php?arg=$1 [qsa,nc] It takes urls of the form /foo/bar and changes them to /foo.php?arg=bar It works properly locally, and it works on my old host but I moved to a new host (running ubuntu) and it behaves differently. On the new host apache notices that...

Subversion: unix permissions on disk for secure apache access

I moved a Subversion repository from a Windows box to a UNIX machine. In both environments I've handled authentication through Apache. On the UNIX box after the move, I could checkout source but received the following error when committing anything: svn: Can't open file '/home/brianly/svn/test/db/txn-current-lock': Permission denied ...

Wildcard subdomains in IIS7. Is it possible to make them like it is in Apache?

Hello! Is this possible to configure IIS7 to achieve the same functionality like Apache has regarding wildcard domains? I'm interested in routing user in ASP.NET web application based on subdomain user used in URL. Something like is described here: http://steinsoft.net/index.php?site=programming/articles/apachewildcarddomain Thanks ...

How to encode special characters using mod_rewrite & Apache?

I would like to have pretty URLs for my tagging system along with all the special characters: +,&,#,%, and =. Is there a way to do this with mod_rewrite without having to double encode the links?' I notice that delicious.com and stackoverflow seem to be able to handle singly encoded special characters. What's the magic forumla? Here'...

Extension PHP5 does not parse in XAMPP

Hello, I've installed XAMPP Apache server and put my website into htdocs. I've started Apache server. On my website I've got files with extension PHP and with extension PHP5.The difference is that when I type in into browser localhost/file.php - I see a parsed website. But when I type localhost/file.php5 (i have this file on server), t...

How do you configure Apache/PHP to accept slashes in query strings?

I have two Apache servers running PHP. One accepts forward-slashes in the query string and passes it along to PHP in the expected way, for example: http://server/index.php?url=http://foo.bar works and in PHP this expression is true: $_REQUEST['url'] == "http://foo.bar" However, in the other Apache server, the same URL results in a ...

Setting up the default script interpreter in Apache on Linux

On Windows, the following registry setting configures the script interpreter to be used by Apache: HKEY_CLASSES_ROOT\.cgi\Shell\ExecCGI\Command=C:\Perl\bin\perl.exe How is this done on Linux? ...

How do you maintain session state in Apache?

I need to maintain session information between REST calls to an Apache server. Not having ever developed on the Apache platform I hope to find a package / module that can help facilitate session information and application security. Please target you answers for a newbie. ...

Bugzilla error after installation: "TEST-FAILED Web Server is not executing CGI files"

I want to install Bugzilla on my linux server. The installation was successful, but it gives this error: TEST-FAILED Web Server is not executing CGI files How to resolve this? ...

My site was hacked, htaccess file compromised, what should it look like?

A website I maintain pro-bono was hacked, dishing out 302s to gaming sites, etc. www.rebekahshouse.org. After much searching through my hosting company's control panel, I found the culprit in the htaccess file. It looked something like this: RewriteEngine on RewriteCond %{HTTP_REFERER} .oogle.com [NC,OR] RewriteCond %{HTTP_R...

How do I track down a mod_perl memory leak?

I'm using mod perl 1.3.0 with apache 1.3.41 perl version 5.8.6, and the memory size seems to grow about 4k every 3rd or 4th request. The Perl script we are running is simply: print "Content-type: text/html\n\n"; print "baby"; Yet that apache process just grows and grows when we slam it with apache benchmark. We are hitting it with:...

What are some good C++ resources for effectively using Apache XML Security?

I'm looking for some resources that allow me to understand how to use this library, particularly for signing XML. Most of what I found out there is Java related, and I would prefer to get documentation/FAQs/tutorials on the C++ library. ...

Rewrite fails to catch simple errors.

Recently I've added the tail of this file to optimize url's like site/5/john-doe[.php] instead of site/5/john-doe/[index.php], however, I rather like my custom error documents, and these modifications call a black & white "Internal Server Error" and "additional 404" error page. It might be helpful to know that most of the site will rema...

Why does my Django app not work with Apache/mod_python?

I have Apache setup to serve requests for http://www.mysite.com from this directory: /var/www/html/www.mysite.com The Django site is in /var/www/html/www.mysite.com/mysite. I get this error when I make a request for /mysite/app/foo: (big stack trace) AttributeError: 'module' object has no attribute 'common' 'myapp.common' is the fir...

RewriteRule checking file in rewriten file path exists.

How can you use ModRewrite to check if a cache file exists, and if it does, rewrite to the cache file and otherwise rewrite to a dynamic file. For example I have the following folder structure: pages.php cache/ pages/ 1.html 2.html textToo.html etc. How would you setup the RewriteRules for this so request can be send ...

CruiseControl.Net Dashboard + Apache

I'm trying to get cc.net dashboard running on a build machine that also has apache on it. I've tried installing mod_aspdotnet as described here. I can run the sample aspx page, but I am unable to get cc.net to run. Is there some magic I need to do? For what it's worth, http://localhost/ccnet manages to redirect me to http://localhost...

mod_rewrite generating errors in log

On my site I have mod_rewrite rules to make the URLs more search engine friendly, and it all works fine on the frontend, but I'm getting errors in the error log like this [Thu Jan 22 22:51:36 2009] [error] [client {IP ADDRESS HERE}] File does not exist: /{some rewritten directory} The rules I'm using are rather simple, along the lines...

Performance Benchmarking for Apache Nutch

I want to know if there are any existing benchmarks and sizing information for an apache nutch based search engine deployment. I want to know for say 10 million searches a month what should be the hardware sizing that needs to deployed. ...