apache2

How to make apache slow and unreliable?

I'm writing some code on a mobile device that uses a REST service to retrieve data from a host. That REST services is being proxied by Apache. In test mode I would like to be able to simulate network outages (as if the device has lost it's cell connection) to test the applications handling of intermittent failures. I also need to valid...

WebDAV behind a reverse proxy

I have 2 servers. One Reverse proxy on the web and one on a private link serving WebDAV. Booth servers are apache httpd v2. On the proxy I have: ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass /repo/ http : //share.local/repo/ ProxyPassReverse /repo/ ht...

apache syslog-ng error logs and access logs

Hi, I am trying to send all my apache logs to syslog-ng(on remote machine) which in turn writes to a file. so I configure syslog-ng this way source s_apache { unix-stream("/var/log/apache_log.socket" max-connections(512) keep-alive(yes)); }; filter f_apache { match("error"); }; destination df_custom { file("/var/log/custom.log")...

Apache2 "sleeps" for couple of seconds on Windows

Hi guys, I run an Apache2 server on my Windows XP Pro SP3 machine. The problem I am having is that it does not want to start loading php page for 2-3-4 seconds. I monitored the Task Manager and the httpd process is at 0% cpu activity for that time and then on starting to parse the page, it goes to 20-30-50%. The webserver should not be...

Apache Port Proxy

I have a non-Apache server listening to port 8001 and Apache listening port 80. I want a certain virtual domain to actually be served by the non-Apache server over port 80. Example Servername mysite.com # Forward this on to the server on port 8001 I thought I could do this with mod_proxy and ProxyPass with something like this. ...

Using domain name in htaccess rewrite

I host several sites (name based in apache) and I currently have an htaccess that has an error handler ErrorDocument 404 http://mydomain.com/errorDocs/404.htm is there a way for me to pass the domain name that the error came from I want to do some basic redirection. I need something like this: ErrorDocument 404 http://mydomain.com/...

Change Mysql, php and apache2 log file formats

I am sending php errors, all mysql queries, apache2 errors and mod_rewrite debugging to one file, needless to say it's busy in there. Can the format be changed from: [22-Jul-2009 23:00:58] Parameters: GET Array ( ) POST Array ( ) [22-Jul-2009 23:00:58] Finding Associations 237 Query SELECT `table`.* FROM `table...

How can I serve unbuffered CGI content from Apache 2?

I would like to be able to allow a user to view the output of a long-running GCI script as it is generated rather than after the script is complete. However even when I explicitly flush STDOUT the server seems to wait for the script to complete before sending the response to the client. This is on a Linux server running Apache 2.2.9. ...

Getting the referrer URL in php ( including parameters )

Are there any HTTP Headers I could use to grab the entire referrer URL using a webserver/server-side scripting? Including query string, et cetera? ...

ProxyPassMatch directive problems

We have an environment with Apache 2.2.11 acting as front end to incoming connections to a Tomcat backend server. We are using the following directives in the http-ssl.conf, which works great when not trying to catch 403 errors: SetEnvIf COMPANY EDLP 4.0.1 NLEDLPKEY=true General setup for the virtual host DocumentRoot "C:/xampp/ht...

Redirect subdomain on tomcat through apache server with mod_jk

Hi, I have a Tomcat (6.0.20) and Apache Server setup (2.2) and am trying to redirect all subdomains to a specific context, on my domain. e.g., s.example.com redirect to www.example.com Apache is fowarding requests via mod_jk (I tried mod_proxy, but the css and js didn't load as its not absolute urls). My current setup: httpd.conf: ...

libapache2-svn, matching version with Subversion 1.6.1

Hello, I'm installing subversion on an Xubuntu desktop system with apache2 installed and running fine. However, I wanted to use Subversion 1.6 because of the sparse directory feature. I'm running Jaunty, but I was able to tell apt-get to download 1.6.1 by temporarily adding the software source "deb http://source archive.canonical.com/ubu...

Calling url when apache service starts

Is it possible to call a url when the apache service starts? ...

Importing big (and corrupt?) plaintext files into mysql broken my lamp install

I was importing data from txt files into mysql (via php script). This dump is huge, it's splitted into 10 files. I imported first and second one and everything was ok - I could see all entries in phpmyadmin, etc. There were about 700 000(?) of entries. When i started to import third one something weird happened - import script loaded for...

Access Control Lists in Debian Lenny

So, for my clients to who have sites hosted on my server, I create user accounts, with standard home folders inside /home. I setup an SSH jail for all the collective users, because I really am against using a separate FTP server. Then, I installed ACL and added acl to my /etc/fstab — all good. I cd into /home and chmod 700 ./*. At th...

Apache not seeing subdirectories of /var/www

Hi, I'm trying to get a basic site running under Apache 2. Eventually I'm aming to use mod_wsgi to serve a django applictation, but for now I've started with a really simple variation of the default virtual host, currently just showing a directory listing of /var/www. The problem I'm having is that the server can't seem to see the direc...

How to use SetEnv with a URL parameter

I'm trying to implement language switching in .htaccess, and the only thing left now is to handle clients which don't support cookies. To do that, I must set prefer-language when the user clicks a link with a language parameter. RewriteEngine On RewriteBase / RewriteCond %{QUERY_STRING} (?:^|&)language=(en|fr|no) RewriteRule ^(.*)$ $1?...

Lighttpd mod_rewrite to Apache Mod_rewrite

Hello, I am looking for some help here. I am trying to convert lighttpd mod_rewrite to apache mod_rewrite Here it is. Lighttpd url.rewrite-once = ( "/torrent/([0-9A-F]{2,2})([0-9A-F]{2,2})([0-9A-F]{36,36}).*" => "/t3/$1/$2/$3.torrent", ) I look up multiply tutorials of apache's mod_rewrite but really no help. Here what I came up...

Apache as Reverse Proxy for CouchDB

I'm thinking of a web app that uses CouchDB extensively, to the point where there would be great gains from serving with the native erlang HTTP API as much as possible. Can you configure Apache as a reverse proxy to allow outside GETs to be proxied directly to CouchDB, whereas PUT/POST are sent to the application internal logic (for san...

Simple rewrite rule for a nginx + apache2 with mod_wsgi

Hi guys, I'm stuck with this, my skills in the web servers area are poor... I have an Nginx acting as a proxy for an Apache2 running with mod_wsgi and mod_rewrite. What I want to do is rewrite every URL from www.example.com to example.com, i.e. stripping the www part from each URL request before serving. This is the layout of the differ...