apache2

Tracking file complete download

Hello, I have a file hosting site and users earn a reward for downloads. So I wanted to know is there a way I can track whether the visitor downloaded whole file so that there are no fake partial downloads just for rewards. Thank You. ...

mod_rewrite with location-based ACL in apache?

Hi. There is a CGI-script that provides some API for our customers. Call syntax is: script.cgi?module=<str>&func=<str>[&other-options] The task is to make different authentiction rules for different modules. Optionally, it will be great to have nice URLs. My config: <VirtualHost *:80> DocumentRoot /var/www/example ServerNa...

Session cookie not being sent when PHP session.auto_start set true

I been trying to replicate a production setup on my development server but can't get the sessions to work properly. After many frustrating hours I've tracked the problem down to the fact that php.ini directive session.auto_start isn't starting the session. AFAIK, session.auto_start = 1 and a session_start() at the top of a script shoul...

Problem Configuring RApache on OS X 10.5.8

Hi Everyone, I've been trying to get RApache set up properly on my Macbook Pro running OS X 10.5.8. After installing RApache successfully (I think), I added the following to the httpd.conf file as suggested in the manual. LoadModule R_module /apache/module/path/mod_R.so ROutputErrors <Location /RApacheInfo> SetHandler r-info <...

Updating .htaccess rewrite conditions

I'll like to update the following rewrite condition to only allow one particular subdomain. RewriteCond %{HTTP_HOST} !^domain.com$ [NC] At the moment, it matches all subdomains, but I'd like to allow just one - admin.domain.com. How would I do this? Thanks for any help in advance. ...

Using mod_rewrite with mod_vhost_alias

I was wondering if it's possible to use the vhost_alias module in conjunction with a rewrite rule. So in my VirtualHost I have this: VirtualDocumentRoot /var/www/%2+/%1 For example, sub.mydomain.com will point to /var/www/mydomain.com/sub/ But I want to check if the folder exists to avoid getting a 404 error if I try to reach a bogus ...

SWFupload problems

Hello all, I use SWFupload for my project but I have a small problem. When I upload a picture locally, everything works fine. But when I use it online, it stops uploading when it hits this : SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 120133. Total: 120133 I can't find the problem. Can somebody help me here? S...

dynamic subdomains and struts2

Hello! I want to create dynamic subdomains on my site. I know how to create it using apache2 mod_rewrite (convert urls like sub.domain.com to domain.com/sub/). But I have one problem: I don't know how my web application learn about this subdomain. How I can do this using Struts2? ...

mod_geoip2 and php pecl-geoip: how can i query by ip address?

Hiya. how can i query the geoip database using php? I have apache2 with mod_geoip2 installed and the pecl extension geoip PHP 5.3. i want to search the country of the ip address i have as a parameter, not to query my own ip address. thanks ...

mod_rewrite works for '/test', but not for '/'.

The following code inside an .htaccess file is behaving incorrectly.. RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} ^(domain\.com)$ [NC] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^/(.*)$ /test/$1 [L,QSA] The above will correctly send requests to 'domain.com/uri-here' to the '/test/'...

How to allow only certain files in Apache

Hello, I'd like to filter access to certain files in apache. I want only CGI access. So I tried putting in vhost file: <FilesMatch "\.cgi$"> Order allow,deny Allow from all </FilesMatch> <FilesMatch "."> # All other files Order allow,deny Deny from all </FilesMatch>...

Running PHP scheduled task through Windows Apache Module....

Okay, so we have this site that we took over from a previous firm...PHP, Zend Framework, MySQL etc. It's an interesting site in that they utilize a CMS that's external (they manage some data like forums, user subscription, etc.) So there's a library that communicates via web service calls from PHP to the CMS, and then from JavaScript i...

mod_wsgi excessively slow at startup?

I'm developing a django website which for production uses mod_wsgi - there are barely any visitors so anytime I visit it seems mod wsgi starts up and opens the python processes - it takes about 1-2 entire minutes for it to fully load. Is there anything I could do to not make it slow on initial startup? Is this a common problem or could ...

How to use apache logs to check complete file downloads.

Hello, I have a file hosting site thats using this script MFHS. I want to develop a point system of my own in which points will be rewarded only if the visitor downloaded the whole file. How can I track it and where are the logs relating to it saved in apache? I am using unbuntu server. Or else is there any easier way? The average fi...

How do I fix the build for mod_mono when it cannot find strndup on FreeBSD?

I am installing mod_mono with Apache 2 on FreeBSD and I get the following error when Apache tries to load the mod_mono.so module. Cannot load /usr/local/apache/modules/mod_mono.so into server: /usr/local/apache/modules/mod_mono.so: Undefined symbol "strndup" The prefix I set for Apache is /usr/local/apache and I have PHP an...

Apache virtualhosts and default server not working as expected (serving incorrect content)

Hello I've been playing around with this for a couple of hours and have come to the conclusion that asking someone is probably the best way forwards! I have a fairly out-of-the-box apache install (I've added mod_security and mod_python) so not touched /etc/httpd/conf/httpd.conf I have a number of domains all running as 's and each wit...

logging apache2 to mongodb: apache hook? something out there?

i just found a great blog posting on http://simonwillison.net/2009/Aug/26/logging/ stating the following MongoDB is fantastic for logging". Sounds tempting... high performance inserts, JSON structured records and capped collections if you only want to keep the past X entries. If you care about older historic data but still...

LAMP tutorial. Request->response loop from the ground up.

I just installed wordpress on my local machine because I want to learn some basic web development tools and wordpress has all the components I want to play with. There is a lot going on when wordpress presents a page inside the browser and I would like to get a handle on all of it if possible. So do you have any suggestions on where I sh...

Web service API - which language is better?

Hi, I wrote a web service API which services REST requests in php. It didn't take much time to actually setup this on apache. But, I am more comfortable writing python code rather than php code. Can python be used as a server-side scripting language like php? What changes are necessary to make it work with apache? Thanks Bala Mudiam ...

mod-deflate does not work with mod-wsgi in daemon mode

My client program is sending a gzip-ed http request, which is decompressed by the mod-deflate InputFilter in Apache. This works when I am using mod-wsgi (without any custom configurations) to serve a django site that is receiving compressed requests. However, when I turn on daemon mode via the WSGIDaemonProcess directive, the django site...