apache

mod_rewrite: How to I permit a user with no redirection/rewriting

I'm working with mod_rewrite for Windows (via an ISAPI filter) and haven't yet seen documentation on how to set up RewriteRule to permit the existing url with no changes. RewriteCond %{HTTP_USER_AGENT} !.*iPhone.* [NC] RewriteRule () http://DontWantToRedirect/orAlterURL [R,NC,L] My goal is to create a rule to permit only iPhones with ...

How to use Apache as a proxy for JBOSS AS?

I have Apache running and serving PHP but I will also like to run JBOSS for my other web app. JBOSS is running on port 8080 while Apache is running on port 80. If there is a request for URL example.com, I want Apache to handle it because it is PHP backend but for URL example2.com, I want Apache to forward the request to port 8080 to be h...

Deploying a WAR file gives me a 404 Status Code on Tomcat?

I am fairly new to Tomcat. I just managed to build a project and exported it as a WAR file. I tried manually copying a WAR file to the Tomcat folder then restarting. It created the folder structure and everything but I get a 404 Status code when I try to reach the application. I tried deploying it through the Tomcat Admin panel but I'm s...

Abusing Mod Rewrite for a clean file system, and pretty URLs.

I have a few php files that do a few different jobs. I'd like to change the way my clients access these php files to make it more clean for the end user. The Mod_Rewrite system has shown that it can do some pretty powerful things when in the hands of the right server admin. So I was wondering how far can you abuse the Mod Rewrite rules f...

Setup mecurial to only work with users already authenticated with my server?

I have a mecurial server setup and would like to use it for source control over apache. The setup i followed, however, requires that I have a .htpasswd which it uses to authenticate mecurial users. Is it possible to have this authenticated list be the people who are already users on the server so they don't have to create new id's and p...

Http authentication change working directory

What I would like to do is for my users to log in with http authentication. Based on their login username the working directory will be different. I need to use http authentication because I don't want to interfere with the web application (drupal) that is in the users working directories. I also don't the users to have access to the o...

apache rewrite url

Hi, I am trying to rewrite url and it fails. May I know what is wrong? can someone please enlighten me? I placed the code in .htaccess. I have enabled rewrite_module too. thanks. RewriteEngine On RewriteRule /place/^([a-zA-Z0-9])$ /placelink.php?lid=$1 For example: domain.com/place/xyz -> domain.com/placelink.php?id=xyz Update: I ha...

simple(?) htaccess rewriting issues

hello people, OK I have been messing about with URL rewriting for the last few days and seem to have come to a bit of a dead-end. I have come up with a few solutions that work on some servers and not others, and my hosting company (1and1 - be vary wary of these guys if you choose them as hosts) hasn't been able to help at all. My prob...

Mercurial, Apache, Windows, mod_auth_sspi and hg push

I'm playing with Mercurial 1.6 under Apache 2.2.15 on a Windows box under a Windows domain, running as a central repo server to which select people will have commit permissions. I'm trying to restrict access to Mercurial by restricting access to Apache's /cgi-bin/ to select users via sspi_auth_module. If I browse to the repo page with ...

PHP Code on Separate Server From Apache?

This is something I've never seen done, and I'm not turning up in my research, but my boss is interested in the idea. We are looking at some load balancing options, and wonder if it is possible to have apache and php installed on multiple servers, managed by a load balancer, but have all the actual php code on one server, with the vario...

apache 2.2 stickysession not working

I configured apache 2.2 httpd.conf as follows: ProxyPass /xxx balancer://xxx/ stickysession=JSESSIONID|jsessionid nofailover=on ProxyPassReverse /xxx balancer://xxx/ <Proxy balancer://xxx> BalancerMember ajp://localhost:8009/xxx route=www1 BalancerMember ajp://anotherserver:8009/xxx route=www2 ... </Proxy> but sticky sessio...

Error while starting Apache

I am getting following error while starting apache. Can't locate /usr/sbin/webmux.pl in @INC (@INC contains: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /...

Switch SSLVerifyClient within ReverseProxy context

This is a part of an Apache virtualhost configuration, the incoming request, which matches, are forwarded to the Apache Tomcat server. All clients must send a client certificate for authentication for App1, but for App2 it should be optional. SSLVerifyClient require SSLVerifyDepth 2 SSLOptions +ExportCertData +StdEnvVars ProxyRequests ...

apply mod_rewrite in virtual host

Dear all, i would like to rewrite url in virtual host. Virtual directory : htdoc/dev/ , dev.com syntax in .htaccess in htdoc/dev <IfModule mod_rewrite.c> RewriteEngine On RewriteRule test.html$ test.php [L] </IfModule> I am able to rewrite test.html to test.php in localhost. However, not able to do it in virtual host. What went wron...

How to setup a Sinatra app under Apache with Passenger?

Let's say I have the simplest single-file Sinatra app. The hello world on their homepage will do. I want to run it under Apache with Phusion Passenger, AKA mod_rails. What directory structure do I need? What do I have to put on the vhost conf file? I understand I need a rackup file. What goes in it and why? ...

htaccess 301 redirect entire site but with exceptions

I am trying to create an htaccess file to redirect my entire site except with some exceptions, but I can't get it working. I need to redirect the entire thing, provide a specific redirect, and exclude two pages. Below is my non-working sample. Thanks! RewriteCond %{REQUEST_URI} !^/events/index.html RewriteCond %{REQUEST_URI} !^/calendar...

What conditions can I rely on for a script that determines whether my servers are "up"?

I usually deal with at least two dozen servers on a weekly basis. I thought it would be a good idea to create a script that queries each of them and determines whether they're "up" or not. The servers run either Apache2 or IIS7. The hosting providers vary There are usually multiple sites on each server The setups are inconsistent, the...

Does anyone know of any web interfaces for svn that have 'update' function?

We are in the process of installing svn as our version control and it works great. However, we previously used Contribute Deployer to push files to the production site. Everyone is kind of used to the web interface it uses and I am looking to see if anyone knows of any SVN Repo browsers (web based) that also offer update functionality?...

[Fri Jul 30 20:53:33 2010] [error] [client {IP}] Premature end of script headers: /home/siteroot/public_html/power/fckeditor/test.php

Hi Guys, A problem has been reported to me that uploading through fckEditor will not work. After messing about with some settings it turns out that running php files in the fckEditor folder will not work and an Error 500 is returned. When I checked the log files the message in the subject was returned. The script is simple: <?php echo ...

Apache 4.1 HttpClient POST and GET

can anyone provide an example of how i could use GET and POST (Apache 4.1 HttpClient ) because most of the example that i found are using 3.x . Thanks ...