apache

making HTTP authentication optional with mod-python

Hi all, I've a web application that accesses multiple controller classes based on the parameters it is passed. For some of the controllers, I want users to authenticate themselves (by simple HTTP authentication), and for some I want public access. Is there a way to make this happen? In my .htaccess file, I now have AddHandler mod_pyth...

Compression of content on Apache and Tomcat

Hi, I have Apache configured to compress content from web app running on Tomcat. Also the application uses Compression Filter. How apache handle such situation when it receives compressed content and it's setup to compress content too. Does Apache just shift the content to client or unzip content first and then compress it again? ...

Removing a folder from the URL using Apache mod_rewrite

How do you remove a folder from the URL? I have a Drupal installation in a folder and I would like to remove that subfolder from the URL. So instead of: www.example.com/subfolder/* I would like the url to be: www.example.com/* thanks ...

Java: Automatic cookie handling in HttpClient?

In Java HttpClient feature list it says: Automatic Cookie handling for reading Set-Cookie: headers from the server and sending them back out in a Cookie: header when appropriate. But I can't figure out how to use this feature. I just need to open a web page, let it set all the cookies, then refresh the same page with received...

Online Based Apache Web Log Analyzer By Submitting Just the Raw Logfile

I have a raw "access.log" file from Apache. Is there any web based version tool where I can just submit this raw log file and return me the analysis results I am aware of the code such as AWSTATS, but it require us to install it in the server, which is not what I want. ...

Upload File Size Limit: Symfony Admin Generator Module

I have form created by the admin generator in the backend of a website. It allows the upload of a video to the site. It works fine but strangely, the upload fails for files of 10mb or over. However, I have not set any file limits in my form. Are there Symfony/PHP/Apache/web browser settings regarding this type of behaviour that I can l...

Apache/2.2.9, mod_perl/2.0.4: status_line doesn't seem to work

Response is prepared this way: my $r = Apache2::RequestUtil->request; $r->status_line('500 Internal Server Error'); $r->send_cgi_header("Content-Type: text/html; charset=UTF-8\n\n"); print 'Custom error message'; Request: GET /test_page HTTP/1.1 Host: www.xxx.xxx Response: HTTP/1.1 200 OK Date: XXXXXXXXXX Server: Apache/xxxxxxxx V...

How do I create a long-running PHP process in Apache?

Hi, I need to start a PHP script via Apache - which will basically continue to run - it will be used for a small instant messaging widget - so it must continually run to update other users on new messages. What timeout features or other barriers should I be weary of in Apache? Will some feature of Apache not allow me to run a PHP proc...

Can I used mod_rewrite to change file extensions? .jpeg to .jpg for example

Hi, I am looking to use Apache mod_rewrite to serve a file as .jpg instead of .jpeg. Is this possible? ...

how to configure apache on XP for python 2.6.2 and what do you prefer, python with framework/without?

I am starting python today. It will be my pleasure to have your help. ...

I would really like to use PHP and MySQL persistent connections, but how?

Apache/PHP/MySQL persistent connections have such a bad reputation because Apache handles each request as a child php process, each having 1 persistent connection. When visitors scale, MySQL reachs max connections limit from all the apache/php child processes, each with 1 persistent connection. There's also the issues of temporary tables...

How to disable php language extension (eg. abc.php.fr) ?

by default apache will load php interpreter with .php extension. Somep\how php interpreter also called with this kind of extension .php.fr . How to disable this language extension? ...

How can I assign a handler to handle ANY URLS?

I am doing a website with a REST architecture and I am finding the latter difficult to do. I want to be able to handle HTTP Requests like these : GET /myapp/5445/ HTTP/1.1 ... In an ideal world, I would code my own server and handle all the HTTP requests myself but I actually want to do this project with CGI or PHP and I want to be abl...

How to verify if server can make outbound requests on port 80 and 443?

In relation to this question on an openid issue I'm having, someone asked me to check whether my server is able to make outbound requests on port 80 and 443. Can you tell me how to verify that? The server is: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 PH...

.htaccess mod_rewrite problems

I just recently ported over my source code to Ubuntu Server from Windows and I've been having a few .htaccess mod_rewrite problems. I have mod_rewrite enabled for Apache. Here is my current .htaccess RewriteEngine On RewriteRule ^css/default/?$ css/default.css RewriteRule ^user/?$ user.php RewriteRule ^user/([A-Za-z0-9_]+)/?$ user.ph...

.htaccess Redirect request to files exts in particular folder only

Hi. How do you write rules to redirect all requests to *.php and *.html files in upload/ folder to a text file name forbidden.txt in root www folder. What I'm trying to do exactly is preventing script execution in this dir by redirecting those requests to the text file Note: The upload/ folder is accessibly by ftp used by a group of peo...

Is there a way to force apache to return 404 instead of 403?

Is there a way how I can configure the Apache web server to return a 404 (not found) error code instead of 403 (forbidden) for some specific directories which I want to disallow to be accessed? I found some solutions suggesting the use of mod_rewrite, like e.g. RewriteEngine On RewriteRule ^.*$ /404 [L] As the purpose of sending 404 ...

How to find the culprit module or script on huge Apache/PHP resident memory usage ?

System: Centos 5.3 x86_64, with Apache 2.2 and PHP 5.2 as module (with mysql and oracle connectors) How to debug memory usage / leaks ? dmalloc ? Valgrind ? auto_prepend_file ? We're looking at 500+ MB VSZ and 50+ MB RSS for example, but it can be somewhat higher. And as the instances add up, we end up needing much more memory than wit...

Seamless SSO authenticating against Active Directory

I have a webpage that I only want a specific group to log into. I work at a college and we use Active Directory accounts and only a certain group can access this php page (on apache server). I know I can restrict access with some PHP code, but I want to accomplish seamless login. Everyone uses IE7 at work (which are configured to pass...

Make Apache wait longer before delivering HTTP 408 request timeout

My configuration: Apache 2.2.4 PHP 5.2.4 (fastCGI) Windows XP pro I have a script that takes more than a minute to run but after exactly 60 seconds (proven by Fiddler) the server always delivers a 408 timeout. My PHP max execution time is set to 120 seconds. After doing some reading I've tried putting a "Timeout 120" directive in my A...