apache

Translating an Apache .htaccess file to an IIS web.config

Hello there, I developed an application on my local using PHP, MySQL and Apache and it has a .htaccess file containing this: #Setting the default handler. DirectoryIndex home.do <IfModule mod_mime.c> #Supporting .do extensions AddType application/x-httpd-php .do </IfModule> <IfModule mod_rewrite.c> #Removing .do file ex...

RewriteMap activation

How to activate RewriteMap in apache ? I tried to run rewritemap in httpd config when I restart apache, it says that "RewriteMap not allowed here" i tried to google and go to apache but couldn't find a way to activate it. anyone know? thanks. :) ...

Why would this .htaccess skip over my RewriteBase ?

Here is the begining of my .htaccess # invoke rewrite engine RewriteEngine On RewriteBase /~new # force non domain.com to www.domain.com RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*) http://www.%{HTTP_HOST}/$1 [R=301,L,NC] everytime I request http://www.example.com/~new/whatever I am sent to htt...

Understanding Plesk Watchdog statistics

We have Plesk 8.3 installed. I've started using their Watchdog module to track server useage. Our server routinely has trouble with the amount of traffic we have and I think our MySQL queries need to be smarter. Anyway, looking at the stats from Watchdog, it seems like MySQL usage is low compared to so something else making up the "ov...

Cannot create max_apache event!

Has anyone seen this cryptic error or knows what it means? ...

Can a PHP file name (or a dir in its full path) have UTF-8 characters?

I would like to access a PHP file whose name has UTF-8 characters in it. The file does not have a BOM in it. It just contains an echo statement that displays a few unicode characters. Accessing the PHP page from the browser (FireFox 3.0.8, IE7) results in HTTP error 500. There are two entries in the Apache log (file is /க.php; the let...

Why would this .htaccess be stripping out containing folder?

This is from a .htaccess located under /~new/ # invoke rewrite engine RewriteEngine On # force domain.com to www.domain.com RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$0 [R=301,L,NC] When accessing http://domain.com/~new/hello, it is being rewritten to http://www.domain.com/hello The www. is bei...

How to respond with a custom error response in Apache 2.2 (c++)?

Hi, I am currently trying to have my Apache module repspond with custom error messages, so that a 400 for example contains additional information like "The coordinates are out of bounds". I found multiple sources on Google saying that it is possible, but none could tell me how. So is there some function that would allow me something lik...

open_basedir not having any effect

For my web hosting panel, users need to be blocked from accessing files outside their own directory (/var/www/u/s/username). I tried to use this line in httpd.conf to prevent people from going up a directory. php_admin_value open_basedir .:/usr/lib/php5 But in php.ini, it seems to have no effect. What am I doing wrong? ...

htaccess show holding page

Hi I want to show a holding page to outside users but from my machine gain access to the site. Can I do this with htaccess? ...

Apache: how to limit virtual dir to local network

On my Apache 2.x server at home, I have a number of virtual directories. I've set up my router so that I can access Apache from the internet. I need to keep one of those virtual dirs (/private) from being accessed outside my home network LAN. So given /private, how do I configure Apache to only serve requests to /private from 192.168...

Can IIS supporting ASP.NET and LAMP supporting PHP coexist on the same server?

Can IIS supporting ASP.NET and WAMP supporting PHP coexist on the same server? We already have a WAMP stack setup on a Windows Server 2003 box to support some internal PHP applications, and I want to also setup CI Factory on that box which will try to configure IIS to support it's ASP.NET based dashboard. I want to make sure that there...

How to prevent browser page caching in Rails

Ubuntu -> Apache -> Phusion Passenger -> Rails 2.3 The main part of my site reacts to your clicks. So, if you click on a link, it will send you on to the destination, and instantly regenerate your page. But, if you hit the back button, you don't see the new page. Unfortunately, it's not showing up without a manual refresh; it appears ...

Apache/nginx fine grained (per file) permissions?

Is it possible to set fine-grained permissions using either Apache or nginx? Given a large number of files and a large number of users, what's a good way to specify that each authenticated user only has access his/her own files? user_a can access file_a_1, file_a_2 user_b can access file_b_1 user_c can access file_c_1, file_c2, file_c3,...

Licensing: Changing public domain to Apache license

I am currently modifying a framework which was released to the public domain. Is it ok for me to then release a new framework based on some code from the public domain sourcetree as licensed under Apache ? ...

Allow request coming from specific IP only

I have application hosted Apache UNIX, and I am allowing users to access the application url from citrix environment (from citrix machine). However, currently its possible to access the url from all the connected machines. I would like to put the restriction that it should be only accessed from citrix machine. So if any one needs to ac...

mod_rewrite number of parameters/back-references limitation

Apparently there is a limitation (9) on how many backreferences you can access in htaccess RewriteRules.. But we have a RewriteRule that requires more than 9 parameters, something like this: RewriteRule ^([^/]+)/b([0-9]+)(/a([0-9]+))?(/v([0-9]+))?(,([0-9]+))?(/(ajax|share))?(,complete)?$ /index.php?control=sites&site=brands&control_fil...

Can IIS serve Most Frequently Used static files from RAM?

Can I set up an IIS server so that it will cache the most frequently used static files (binary) from disk into RAM, and serve from RAM on request? Update: mod_mem_cache in Apache Caching Guide seems to be what I'm looking for. Any equivalent thing in IIS? Thanks. ...

PHP in_array triggers Internal Server Error

This really shouldn't be this complicated, which suggests I'm doing something wrong, but after checking the docs I can't figure out what. I'm trying to do a simple check to see if the type of a "tag" is in the list of types to be used during this operation, using this piece of code ($level is passed in as a parameter): $filter = $this-...

mod_perl headers_in not working

I'm using mod_perl 2 with Apache 2.2.3 on Red Hat 5.2, and I'm trying to access the request headers, but the Apache2::RequestRec headers_in method (or rather, its return value) is not behaving the way I would expect. Code fragment: $logger->warn('version ' . $mod_perl::VERSION); $logger->warn('r ' . $r); my $headers = $r->headers_in; $...