apache2

apache2: configuration of mod_dav, mod_dav_fs

Hi there, On a mountpoint (specifically: /var/data/) I have mounted a 3tb raid partition that stores all kind of data and I would like to share it through WebDAV. So I installed davfs2 on my client and set up the server site by adding: ScriptAlias "/var/www/webdav" "/var/data" <Directory "/var/www/webdav"> Dav On </Directory> Fina...

How to mod_rewrite just one querystring parameter?

Hi, I would like to rewrite the following URL: mypage/1234/myaction?api_key=4567 to: api/myaction.php?id=1234&api_key=4567 ...using mod-rewrite. I can get /mypage/1234/myaction -> api/myaction.php?id=1234, but the extra get parameter is causing some problems.... Any ideas? ...

correct configuration for apache and mod_python

hi all, how you must configure Apache 2.2 or mod_python?, to avoid the following error: MOD_PYTHON ERROR ProcessId: 5399 Interpreter: '127.0.1.1' ServerName: '127.0.1.1' DocumentRoot: '/var/www' URI: '/cgi-bin/wps/' Location: None Directory: '/usr/lib/cgi-bin/' Filename: '/usr/lib/cgi-bin/wps/' ...

mod_rewrite: Rewrite root to somewhere else

I'm trying to rewrite URLs to a generic show_page.php script, but I'm having trouble redirecting the root URL. I've been searching Google and stackoverflow but all I've come across implies that ^$ will redirect the root, but for some reason it doesn't. All I get is a 403 Forbidden (since I have indexes turned off). Here's my current .ht...

not able to remove apache , so as to re-install it , as apache2 is not starting .

Bad Request Your browser sent a request that this server could not understand. Reason: You're speaking plain HTTP to an SSL-enabled server port. Instead use the HTTPS scheme to access this URL, please. Hint: https://satyahaha.com/ This is the error which my apache2 server shows . so i tried removing it by typing apt-get remove apach...

Fresh installation of Apache on debian

I want to remove the apache that is previously installed. and want to install a fresh copy.How can I do that? I need clear documentation for the installation because after googling i am not getting that. Thanks ...

mod rewrite code passes Lyxx syntax checker but fails on execution?

Well I only have 2 things going on here RewriteEngine on #part 1. if testdir/something is typed in # then go to testdir?id=something RewriteCond %{REQUEST_URI} home/testdir RewriteRule home/testdir/(.*)$ /home/testdir?page=$1 [L] #part 2. Send everything else to the homepage unless # it is a file that exists, or if the re...

How i say the interpreter version for wsgi apache

In debian recently change de default version of python from 2.5 to 2.6 but i need 2.5, how i can configure apache and/or wsgi script to say it use pythons2.5 and not python default? ...

How do i have Apache to do further handling of the error status set within the PHP script?

Hello! My environment is: shared hosting with PHP 5.2 installed as apache2handler I have ErrorDocuments configured: ErrorDocument 404 "Simply Not Found" # OR ErrorDocument 404 /errors/fancy-not-found.php # both variants works as expected However, most simple example from PHP manual doesnt want to cooperate with Apache2 and perform ...

Apache2 and CGI - how to keep Apache from buffering the POST data?

I'm trying to provide live parsing of a file upload in CGI and show the data on screen as it's being uploaded. However, Apache2 seems to want to wait for the full POST to complete before sending the CGI application anything at all. How can I force Apache2 to stop buffering the POST to my CGI application? EDIT It appears that it's act...

Return an image to the browser in python, cgi-bin

I'm trying to set up a python script in cgi-bin that simply returns a header with content-type: image/png and returns the image. I've tried opening the image and returning it with print f.read() but that isn't working. EDIT: the code I'm trying to use is: print "Content-type: image/png\n\n" with open("/home/user/tmp/image.png", "r") a...

Mod_python on django and debug variable

Hi, I have a problem with my django application. On django developer server its work perfect, but when I switch it to apache something strange happening. Lets check the code: class Criteria(models.Model): district = models.ManyToManyField(District, verbose_name=u"Województwo", blank=True) respondents = models.ManyToManyField(Us...

Apache rewriteCond Rails multi domain setup cache

He People. I have a rails app running for multiple sites and it has a cache that looks like this: tmp/cache/adomain.com/the cached files No this is not picked up by Apache (obviously) and i am trying to set it up in my httpd.conf. But I wasn't able to get it working. This is something i tried: < VirtualHost *:80 > Passenger...

.htaccess redirect "domain.tld/" to "domain.tld/home.html"

Hello everybody. I have a website here on my localhost : http://localhost/mysite/www/index.php I have some RewriteRules to redirect like this : http://localhost/mysite/www/index.php?page=home -> http://localhost/mysite/www/home.html And now, I want to do a redirection like this : http://localhost/mysite/www/ -> http://localhost...

complex mod_rewrite. Any idea ?

Hello everyone, I want to : - switch from http to https if http is used - redirect the subdomain to index?o=subdomain except www - redirection the subdirectory to index?u=user Example : http://www.mydomain.com will be redirected to https://www.mydomain.com http://subdomain.mydomain.com will be redirected to https://www.mydomain.com/in...

Apache+Passenger - Apache running; but not responding to requests

Background I'm running a Ruby on Rails application that has to serve a lot of static files as well. My setup currently is: Debian Linux Lenny 5.0 Apache 2.2.9 Passenger 2.2.10 The problem Everything runs fine. I see apache process spinning up, passenger instances get created and everything works fast and snappy. Then, after som...

.htaccess rewrite to another port

Hello, I have a joomla setup in my /home/joomla directory. I installed both Apache and Lighttpd i have configured Lighttpd to proxy only static files, and lighttpd is listening on port 81. Now what i want is whenever request for static files are made, instead of going to www.domain.com/whatever/bg.jpg it should redirect to d...

Apache doesn't execute my copied PHP files, but testing.php works

Hi all, I've just installed LAMP on my Ubuntu 9.10 machine, and everything works fine except when I copy my PHP files from another computer. The LAMP guides I've followed also made me create a phpinfo() test file, which works, but when I try to type in e.g. index.php absolutely nothing happens - just a blank page in FireFox. :( The fi...

I want to return a specific error code on access of a page

I would like to return an error code on accessing a page, specifically a 418 error to see how my browser/server will implement it (and in case I ever manage to wire the appropriate devices to my digital coffee/tea pot I would like to know when it's done :) ) Is this even supported on Apache/2.2.14 (Ubuntu)? ...

reset http-auth with php

Hi is there any way to tell Apache that it should restart the session and drop an existing http-auth? I've a system where a user is first authenticated with http-auth against apache and afterwards authorized for services within the PHP-Application. Once the user logs out I'd prefer to also reset the existing http-auth somehow. Any idea...