apache

Escaping '?' in mod_rewrite

The tail end of my .htaccess reads: RewriteCond %{query_string} ^(.*)$ RewriteRule ^([a-zA-Z0-9\-]+)/\?iframe x_iframe.php?pageurl=$1&%1 [L] RewriteCond %{query_string} ^(.*)$ RewriteRule ^([a-zA-Z0-9\-]+)/?$ x.php?pageurl=$1&%1 [L] What I'm trying to do is have it so that any URL ending in '?iframe' uses a different page. What am I...

Self-extracting web environment

Hi, Basically I have two applications: a PHP web application that runs over Apache and Mysql a ruby application that has been built with gem dependencies What I would like to be able to create is a self extracting archive; once all the files have been extracted into any directory, my users can just click two bat files: the first o...

PHP $_SERVER['HTTP_HOST'] vs. $_SERVER['SERVER_NAME'], am I understanding the man pages correctly?

I did a lot of searching and also read the PHP $_SERVER man page. Do I have this right regarding which to use for my PHP scripts for simple link definitions used throughout my site? $_SERVER['SERVER_NAME'] is based on your web servers' config file (Apache2 in my case), and varies depending on a few directives: (1) VirtualHost, (2) Serve...

Integrating Apache and Restlet server like Apache and Tomcat

Hello, I have my Apache http server running on localhost:80 and restlet server on localhost:8182, but I want to configure above combination just like Apache http server and Apache tomcat servlet container can be configured with mod_jk library. Is it possible? Do I have to modify code of mod_jk for this purpose. Please advice!!! Than...

How to pass a session between tomcat and php.

Hey, I am in a WTF code situation working on a jsp tomcat server and trying to pass session data (user id, etc.) to php. i am planning to rewrite php session handling with session_set_save_handler() my question is where does tomcat stores it session data (harddrive?) and what kind of encoding does it uses? or am i on the wrong path? i kn...

Apache Tomcat 6 Problem Not Found(404)

Dear ppl, I am unable to open html page of my web application and getting error Not Found(404). Resource Not found.Also I am unable to open Tomacat Manger/Examples. Checked that instance is already running whnen I try to configure or start manually. I donot have start.exe n stop.exe in my bin but having tomcat6.exe tomcat6w.exe as menti...

http connector for Restlet and Apache http server

Hello, I have figured out that to integrate calls between Apache HTTP server and Restlet, I need to write my own HTTP connector using the Restlet provided API's. Is my assumption correct? If I am wrong reply back with possible solutions. I need suitable references that can guide me to write plugins for my above mentioned requirement. ...

Stopping mod_rewrite rule match, circular execution

I have old.htm and new.htm on a directory, and I need to load file.php every time someone access old.htm, and load old.htm every time some access new.htm. Here are my non-working rules: RewriteRule ^old\.htm$ file.php?%{REQUEST_URI} [L] RewriteRule ^new\.htm$ old.htm [L] When old.htm is accessed, file.php is called. When new.htm is a...

Double request from mod-rewrite

I've written a module that sets Apache environment variables to be used by mod-rewrite. It hooks into ap_hook_post_read_request() and that works fine, but if mod-rewrite matches a RewriteRule then it makes a second call to my request handler with the rewritten URL. This looks like a new request to me in that the environment variables a...

PHP mail() works from command line but not apache

I'm trying to figure out why the mail function in PHP fails when called via web browser (i.e. apache), but I can run the same script from the command line using php -f mailtest.php This is one of my client's Fedora servers, so I don't grok it completely, but I do have root access should I need to change anything. from php.ini: ...

How to check if memcache or memcached is installed for PHP?

How do I test if memcache or memcached (for PHP) is installed on my Apache webserver? Memcache is a caching daemon designed especially for dynamic web applications to decrease database load by storing objects in memory. ...

Is cgi dead?

Ok, let's put it in a more mildly: Is cgi (common gateway interface) legacy? yes? no? Under what circumstances would a project starting today (one that does noot have to interact with legacy systems or libraries) use cgi? ...

internal server error (500) in simple cgi script

I am trying to run a simple cgi script after configuring my server. My script looks like this: print "Content-type: text/html" print print "<html><head><title>CGI</title></head>" print "<body>" print "hello cgi" print "</body>" print "</html>" When I go to my scripts url http://127.0.0.1/~flybywire/cgi-bin/main.py I get: Internal Se...

How can I use Apache to serve static content for a RoR app when I have only .htaccess access (and can't add Apache modules) [on Dreamhost shared server]

Hi, Are there any Rails/Apache gurus that might know if it's possible (and how) to have the ability for users to upload their content to my RoR application but then subsequent access to such static content would be: a) served by APACHE web server [to avoid the overhead of going via Rails], but b) still want to have an authenticatio...

What is the best alternative way of monitoring apache Active MQ other than using JMX API

Hi, I have tried and tested the JMX API and it is pretty simple to use and provides a vast number of statistics required for monitoring ActiveMQ. But the problem is, i dont want to monitor my ActiveMQ remotely and also i dont want to use another API.To be more precise, i want to use the JMS API itself to get statistics related to vario...

Run Django with URL prefix ("subdirectory") - App works, but URLs broken?

Below are the relevant configuration files, also at http://dpaste.com/97213/ . The apache config is currently working, because accessing 'example.com/' shows me the index.html file I have placed at the document root. I'd like to serve Django/apps at the prefix '/d', so 'example.com/d/' would load the default app, 'example.com/d/app3' ...

PHP Server settings causing problem

Hello, On my site http://www.mediadeals.co.uk , I'm getting this strange error. The site was working perfectly well a week ago on the old server. The error is: Fatal error: Cannot redeclare class soapclient in /home125b/sub013/sc71724-JPYM/www.mediadeals.co.uk/www/includes/libs/payment/do_payment.php on line 5261 I'm sure i...

How do I get mod_perl to recognize changes to my application?

I'm running an apache2 / mod_perl2 combo on our development server. When I'm developing, my changes are instantly reflected in the webpage I'm working on. I assumed mod_perl was being clever and was reloading files when they were changed. But now another developer is working on a different part of the system and their changes are not p...

Better webserver performance for Python Django: Apache mod_wsgi or Lighttpd fastcgi

Hello, I am currently running a high-traffic python/django website using Apache and mod_wsgi. I'm hoping that there's a faster webserver configuration out there, and I've heard a fair number of recommendations for lighttpd and fastcgi. Is this setup faster than apache+mod_wsgi for serving dynamic django pages (I'm already convinced that...

How can I know if tomcat is running behind Apache?

In production we run tomcat behind apache, in development bare tomcat. How can I know inside the Servlet class if it is running behind apache or not? ...