apache

SSL and mod_rewrite error

Hi, I have https on my site. Pages with rewritten URL in my site are inaccessible while direct urls (folders). here's the htaccess ## 2009-12-17 16:52 JGC [START] ## Enable http compression for this site <IfModule mod_deflate.c> SetOutputFilter DEFLATE ## Directive "DeflateCompressionLevel" not allowed in .htaccess, only valid in...

Many producer, single consumer with python/mod_wsgi

I have a Pylons web application served by Apache (mod_wsgi, prefork). Because of Apache, there are multiple separate processes running my application code concurrently. Some of the non-critical tasks that the application does I want to defer for processing in background to improve "live" response times. So I'm thinking of task queue, man...

Redirect in combination with a rewrite condition in htaccess

Hi all! I've got a cms-driven website, with no option to change the code. What I want to accomplish is creating friendly url's, using only apaches mod-rewrite engine. The problem is I'm creating an infinite loop, because I first redirect the original url (index.php?id=21) to a friendly one (/friendly/) and then rewrite the '/friendly' ...

Benchmarking an Plesk managed server using ApacheBench?

Is it possible to benchmark a Plesk-managed server by using ApacheBench ? The following console command only takes local URL's as parameter, but I have no idea on what the URL is for my domains in Plesk... ab -c 10 -t 60 http://xxxxxx ...

Quee operations on Apache with PHP (Run in the background)

Hi. I want to be able to in some way "quee" operations on Apache web server with PHP. For example I want to create a loop like this: <?php foreach($files as $key=>$value){ download($value); } ?> The "download" function just runs wget and downloads the file to a specified position. This is working OK but my problem is that during this...

Htaccess Rewrite Rule

Hi, I'm getting crazy with .htaccess and rewrite rule. I'd like to understand how it works, I hate it, anyway here's my problem. (really simple for most of you) My site has one main page index.php. This is the only page, all the others are handled by this one. I did a simple RewriteRule: RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page...

Need help with htacess - over and over

Hello! I have a few lines in my .htacess Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^mydomain.org [NC] RewriteRule ^(.*)$ http://www.mydomain.org/$1 [L,R=301] # index.php to / RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /.*index\.php\ HTTP/ RewriteRule ^(.*)index\.php$ /$1 [R=301,L] # forum RewriteCond %{REQUEST_U...

The whole site is blocked while one page is waiting for blocking operation (PHP, ASP.NET). Why?

Good day! I've found interesting behaviour for both LAMP stack and ASP.NET. The scenario: There is page performing task in 2-3 minutes (making HttpWebRequest for ASP.NET and curl for PHP). While this page is processed all other requests to this virtual host from the same browser are not processed (even if I use different browsers from...

CodeIgniter Project Giving 303/Compression Error

Trying to setup a CodeIgniter based project for local development (LAMP stack), and once all the config file were updated (meaning I successfully had meaningful bootstrap errors for CodeIgniter), I get this error in my browsers: Chrome Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error. Firefox Content Encoding Error: The page...

What is Apache process model?

I have been googling this question for some time but got no answers. What's the Apache process model? By process model, I mean how Apache manage process or thread to handling HTTP request. Does it fork one process for each HTTP request? Does it have process/thread pool? Can we config it? Is there any online doc for such Apache deta...

mod_rewrite browser trying to get content from non-existant dir

I have my mod_rewrite set up so that it redirects all requests that aren't targeting existing files or directories to index.php?req=* where * is the request. Works all fine but when I send the browser to something like this: http://myurl/A/B/C The browser tries to find all images, stylesheets in the non-existing folder C. How can I m...

Redirect a specific IP address to a special page of my homepage with .htaccess

How can I use .htaccess to forward a visitor of a specific IP address to a webpage on my server? This example causes an infinite loop: RewriteCond %{REMOTE_ADDR} ^123\.\123\.123\.123$ RewriteRule ^(.*)$ /specialpage.php [R,L] I found this on the web but it just does not work: SetEnvIf REMOTE_ADDR 123.123.123.123 REDIR="redir" Rewri...

Getting SSL to work with Apache/Passenger on OSX

I use apache/passenger on my development machine, but need to add SSL support (something which isn't exposed through the control panel). I've done this before in production, but for some reason I can't seem to get it work on OSX. The steps I've followed so far are from a default apache osx install: Install passenger and passenger pre...

Apache RewriteRule .* index.php [NC,L] Not working

I am trying to redirect everything to a single page from my /website/folder/ directory. I added a simple .htaccess with this simple code (I know this would require more code in .htaccess but it's just a test). RewriteEngine on RewriteRule .* index.php [NC,L] When I try : http://127.0.0.1:8888/website/folder/fileDoesntExistMustGoInde...

Run a PHP-script from a PHP-script without blocking

I'm building a spider which will traverse various sites and data mining them. Since I need to get each page separately this could take a VERY long time (maybe 100 pages). I've already set the set_time_limit to be 2 minutes per page but it seems like apache will kill the script after 5 minutes no matter. This isn't usually a problem sin...

Apache rewrite with many slash not working?

I have modified a website with a redirection to a single page: RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^.*$ index.php [NC,L] It works as it suppose to be. Everything is redirected to index.php. Here is a working example tha...

Bad mod_rewrite or .htaccess Practices?

I'm just getting into using mod_rewrite and I want to know from the server gurus what gets under their skin about web developers like me playing around with their apaches. Are there some common developer mistakes and/or bad practices to avoid? ...

Help with replacing Mac factory install of apache with MAMP PRO so FileMaker will work with my other websites?

I am running Mac 10.4 and have been using MAMP PRO to host several websites I manage. Now that I have installed FileMaker Pro Server, it forces me to turn Web Sharing on in System Preference. So is it possible to either replace Apache with MAMP PRO's version? Or is it possible to get FileMaker Pro to use MAMP instead of Web Sharing? I...

PHP won't parse MySQL statements

I just installed Apache 2.2.15/PHP 5.3.2/MySQL 5.1.44 on Windows Vista. Apache is working fine, PHP is functional, and MySQL works on the CLI. However, when I try to access MySQL via PHP, I get an error (Fatal error: Call to undefined function mysql_connect()). extension=php_mysql.dll and extension=php_mbstring.dll are uncommented in the...

Code won't work under mono, any ideas whats wrong?

Mono won't fire the following code: I get internal server error 500, error writing request error. Code works perfectly under normal .net.... any ideas why its broken and how to fix it? [WebServiceBinding] public class testService : System.Web.Services.Protocols.SoapHttpClientProtocol { private string DummySoapRequest = @"<...