apache

mod_rewrite ignores [L]

I want to be able to rewrite this http://localhost/.../identicon/f528764d624db129b32c21fbca0cb8d6.png to http://localhost/.../identicon.php?hash=f528764d624db129b32c21fbca0cb8d6 so I add to the /.../.htaccess so this is it: RewriteEngine On RewriteRule ^resource/ - [L] RewriteRule ^identicon/(.+)\.png$ identicon.php?hash=$1 [QSA,...

Infinite loop on combination of RewriteRules

So I'm setting up SVN on my home server (Ubuntu 9.1), and want the ability to view any changes made to my CodeIgniter app immediately. So, my working copy lives in /home/myname/environments/development/appname. My Vhost is accessible at dev.appname.myname.ca, and the config looks like this: DocumentRoot /home/myname/environments/deve...

PostMethod setRequestBody(String) deprecedated - why?

I am using Apache Commons HttpClient PostMethod 3.1. In the PostMethod class there are also three methods for setting POST method's request body: setRequestBody(InputStream body) setRequestBody(String body) setRequestBody(NameValuePair[] parametersBody); NameValuePair API First two methods are deprecated. Does anybody knows why? Bec...

Problem downloading large files with Rails, Nginx (with x-accel-redirect) and Apache(x-sendfile)

Hi to all! We have a big problem with downloads when the size is over than 1gb. We are using Rails 2.3.5, passenger 2.2.9 on Amazon EC2 2gb with 2gb of Ram and Fedora 10. Files are stored on /mnt/files, project is on /mnt/www/project We tried to send files with Nginx and x-accel-redirect and also Apache with x-sendfile. We can down...

Mod_Python + Django library import issue

Hello, I recently had a site that was running perfect for months, all of a sudden it decided to dump itself for no approximate reason. I am running django + mod_python + apache, and the system decided it was time to start ignoring the import of the pycurl library, my intial first thought was that somehow the library had become corrupte...

.htaccess SSL on certain pages

Basically I'm using drupal and can current redirect to an SSL page. But once on that page and continuing navigation all the pages continue over HTTPS. There is a single page I need SSL on and I need to redirect back after you leave that page. Currently I have this: RewriteCond %{SERVER_PORT} !^443$ RewriteRule ^conference https://url/c...

Getting Apache to close connection after a certain size limit

I have a CGI script I'm writing that's handling a streaming file upload. I'm also using Apache. If a certain size limit is reached, I have the CGI script finish things up, then it sends an HTTP redirect and exit. What I'd like to have happen at this point is for Apache to close the connection. Instead, what Apache does is keep the co...

What permissions for PHP scripts/directories?

Hi, I am trying to help a friend moving a web-site from one web-hotel to another. The old place is already closed, I have only a flat tar file of what was in it. I apologise if this is a basic question. I am new to this... The web site contained html docs and one could download a little java application (to be loaded on mobile phone) ...

PHP/Apache REQUEST_URI different behaviour?

I am moving websites from one server to another. Both are on a similar variant of Centos 5 x64 with Apache 2.2 and PHP 5.2.X. Some of my scripts including Wordpress are behaving incorrectly. It turns out the issue is the difference between the REQUEST_URI global: On the older server: REQUEST_URI = /phpinfo.php On the new server: REQUES...

IPC::Open3 Fails Running Under Apache

I have a module that uses IPC::Open3 (or IPC::Open2, both exhibit this problem) to call an external binary (bogofilter in this case) and feed it some input via the child-input filehandle, then reads the result from the child-output handle. The code works fine when run in most environments. However, the main use of this module is in a web...

use htaccess to add www with https support

There are a lot of code examples for using .htaccess to add www to a url but they are usually confined to using http. does anybody have an example of how to get it to work in both cases? ...

Why Firefox keeps negotiating kerberos service tickets ?

Hi, I ran some tests on Kerberos and found out some strange behavior related to Firefox and Kerberos. I have a server running Apache + mod_auh_kerb which is configured to check kerberos credential when serving requests from clients. Kerberos authentication is performed and user without valid credentials are rejected. However, I do not u...

Tomcat serving URLs wrong with mod_proxy and apache

I've set up a host with apache to serve static pages and to use Tomcat to serve my web application (See this question). The static pages are server from "http://myhost.com" and the dynamic (tomcat) pages are server from "http://myhost.com/myapp" The mod_proxy makes sure the "http://myhost.com/myapp" are forwarded to tomcat server run...

Web site migration and differences in firebug time profiles

I have a php web site under apache (at enginehosting.com). I rewrote it in asp.net MVC and installed it at discountasp.net. I am comparing response times with firebug. Here is the old time profile: Here is the new one: Basically, I get longer response times with the new site (not obvious on the pictures I posted here but in averag...

Tiles 2.2.1 configuration

I have used Tiles 2.1, but in version 2.2 configuration has changed, but sadly their documentation seems to be very confusing*, at least for me. And their example project download link is not working. http://tiles.apache.org/framework/tutorial/configuration.html ...

Uploaded docx files turning into zip

I am currently using symfony 1.4 and would like to allow users to upload Microsoft Word docx files. Using the sfWidgetFormInputFile widget and sfValidatorFile below users are able to select and successfully upload their docx files using a simple web form. $this->widgetSchema['file_name'] = new sfWidgetFormInputFile(array('label' => 'Fi...

Mod Rewrite : Replace all _ (underscore) with - (hyphen)

I need to have all _ (underscores) in every url to be replaced with - (hyphens) I currently do it this way, but am looking for a more simpler way of doing this so I do not have to add a line every time a url gets longer. RewriteRule ^([^_]+)-([^_]+)-([^_]+)-([^_]+)-([^_]+)-([^_]+)-([^.]+)-([^.]+)-([^.]+)-([^.]+)$ index.php?/$1_$2_$3_$4...

htaccess/mod_rewrite doesn't work.

I have tried this but it doesn't seem to work: RewriteCond %{QUERY_STRING} ^?var=10&view=3$ RewriteRule ^/index.php$ http://www.domain.com/index.php?var=11&view=1 [L,R=301] ...

CherryPy changes my response code

In my python application using mod_wsgi and cherrypy ontop of Apache my response code get changed to a 500 from a 403. I am explicitly setting this to 403. i.e. cherrypy.response.status = 403 I do not understand where and why the response code that the client receives is 500. Does anyone have any experience with this problem> ...

Dynamically create image thumbnails (using django)

I would like to dynamically create thumbnails based on parameters in the URL. For example, http://mysite.com/images/1234/120x45.jpg would create a 120x45 thumbnail for image id 1234. The obvious solution to this is to have a django view which does the following: Look for a previously cached version of the image at this size. Create a ...