apache

Basic apache server, mapping 127.0.0.1, to 10.0.0.7:8000

I'm working on this project where the client has a virtual server setup. I installed apache and such and got everything working fine on localhost. But in order for it to show up on the internets, the people that run this virtual server needs me to: "If you try and reach 10.0.0.7:8000 you do not come to the index page but if you do loca...

HEAD GET decoded requests

Hi, We run a service on jboss. Sometimes we receive requests that have params completely decoded. Below is the apache access log entries. Look at the redirect_url params in following urls. For such urls to work the params need to be encoded. Urls that we post are encoded. Either somebody is explictly decoding stuff before it reaches us,...

How to cache Apaches GZIP compressed content

Apache has built in capabilities to GZIP content (HTML, JPG.. etc) Every time its done it uses slightly more CPU then it would normally. So my question, Is it possible to cache the end compressed version instead of having your machine doing it every single time. ...

Adding Web Service Reference to Apache Tomcat Fails In .NET 2008 (C#) App

I've been trying to add a web reference to a webservice located on an Apache Tomcat web server but I always receive an "HTTP status 503: Service Unavailable". I've been told that the problem is that Tomcat doesn't allow 2 HTTP parameters when requesting the wsdl. The URL I'm trying to retrieve the wsdl looks like: http://208.35.164.35...

What's the simplest way to count the number of requests to /foo/ that Apache has served?

I'm looking to retroactively parse the logs and count the number of /foo/* requests that have occurred to have a baseline benchmark for a new feature that we're pushing. A simple command line script would be fine -- with an added bonus for being able to specify a date-range. Some use of grep, perhaps? ...

Too many TIME_WAIT connections

We have a fairly busy website (1 million page views/day) using Apache mod proxy that keeps getting overloaded with connections (>1,000) in the TIME_WAIT state. The connections are to port 3306 (mysql), but mysql only shows a few connections (show process list) and is performing fine. We have tried changing a bunch of things (keep alive o...

Apache shutting down unexpectedly

Hello, I have a mongrel server running behind Apache. It works fine; however, every now and then the Apache server shuts downs seemingly by itself. I'm not sure if there is configuration issue or if it's an attack. Here is Apache error log: [Thu Apr 30 02:15:07 2009] [notice] SIGHUP received. Attempting to restart [Thu Apr 30 02:15:0...

Can you configure mod_proxy as a reverse proxy cache?

I can configure mod_proxy to be a forward proxy cache and I can configure it to be a reverse proxy. Is there any way to configure it to be a reverse proxy cache? I haven't had any luck with that yet. ...

What is the proper way to re-direct?

If I have two domain names: altcognito.com and say I've got the other following domain: alt-cognito.com What's the "best" redirect (do I use permanent etc...?) I want to suggest that altcognito.com is the "correct" website. (naturally, these are just examples) ...

Configure Apache to forward dynamic page requests to Tomcat in friendly url scenarios

I have a website with friendly urls. I want all url´s that end with .htm, .gif, .jpg, .css, .js be served directly by the Apache web server and the rest passed on to Tomcat. examples of dynamic url´s that should be forwarded to Tomcat: www.mysite.com/news/newsItem1 www.mysite.com/videos www.mysite.com/news/list.jsp examples of stati...

Risk of using Apache mod_proxy

I am now exploring to use Apache's mod_proxy's directive, eg ProxyPass, as part of solution for cross-domain scripting restriction (for html/ajax/flash code). However, I am afraid by enabling mod_proxy, I would risk having the server as open proxy. What's the risk, and how to minimize the risk, in short? Thanks. ...

IIS mod/extension to support eXtended Server-Side Includes (XSSI)?

I've been working with a designer that wants ot bring some content developed on Apache to IIS. The content however makes use of XSSI. I have not been able to find out if IIS can support such things. Perhaps its named something else on Windows/IIS? A sample of this is shown below: <!--#config timefmt="%Y%m%d" --> <!--#if expr="$DATE_LO...

apache localhost sites opening in Firefox, but not IE or Safari?

I'm running WAMP on Vista and have Apache virtual hosts and my hosts file all set up to allow me to test sites locally using an address like this: http://testsitex.localhost:8080 Only problem is, it only works in Firefox. IE and Safari (currently the only other browsers I've tried, and the two I'm most concerned about) display an an er...

How does Phusion Passenger reuse threads and processes?

I am setting up an Apache2 webserver running multiple Ruby on Rails web applications with Phusion Passenger. I know that Passenger spawns Ruby processes for handling requests. I have the following questions: If more than one request has to be handled at the same time, will Passenger spawn multiple processes or multiple (Ruby) threads? ...

What's the best way to examine apache's access.log files?

What tool(s) would you guys recommend for relatively straight forward (nothing fancy) charts based on apache's access.log files? Ideally I'd have something that ran on the server and had access to the directory and understood that the files are .1, .2, .3 etc and knew how to parse them (and had a web front end). I'm assuming there are nu...

Match Question Mark in mod_rewrite rule regex

I am looking to rewrite urls with multiple substrings. One substring is being requested as a subdirectory, while any others are requested as normal query string parameters. For example, I would like to rewrite urls from http://www.mysite.com/mark/friends?page=2 to http://www.mysite.com/friends.php?user=mark&amp;page=2 I am able t...

logging in mod_python/apache

What is the standard way to make python's logging module work with apache/modpython? I want to call mylog.warn('whatever') and have that result in a call to req.log_error() where req is the modpython request. Is there an easy way to set this up? ...

django apache on windows setting problem

python setting at httpd.conf: <Directory "C:/depot/projects/web/"> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all AddHandler python-program .py PythonHandler mod_python.publisher PythonPath "['C:/Python25/Lib/site-packages/mod_python/',]+sys.path" PythonDebug O...

How to set up virtual hosts on Apache 2.2

Can anyone direct me to a good tutorial on how to set up virtual hosts using Apache 2.2? Here's my situation: I have Apache running on my laptop and I want two websites-- one on port 80 and one on port 8089. I want to access each site from the other computer on my network by entering the computer's IP address, such as http://192.168.1...

Can I find which user the web server is being run as in PHP?

I'm writing a simple web app in PHP that needs to have write access to a directory on the server, if the directory isn't writable I want to display an error message explaining to set the owner of the directory to whoever the webserver is being run as (eg. www-data, nobody) but as most people don't know this it would be nice to be able to...