apache

RewriteRule, Proxy directive [P] - Is it possible to make request use actual proxy host?

Hello Everybody Does anyone know whether it is possible to make rewrite rules which use the proxying [P] directive, as shown below, to behave like ProxyPass used in conjunction with ProxyPreserveHost Off. In other words I want the server on mydomain.net to see a request for mydomain.net not mydomain.com. RewriteCond %{HTTP_HOST} ^myd...

chrooted Apache+MsSQL on openBSD; Could not determine the server's fully qualified domain name

php generates GIFs on the web server using a databases on a second server. The the page shows 20 GIFs, so there is some load for a short time (multiple connections) Some GIFs are loaded but some are not, in /var/www/logs/error_log [Mon Feb 23 10:05:56 2009] [error] PHP Warning: mysql_connect() [function.mysql-connect]: Lost connect...

Apache RequestHeader Directive in .htaccess

Hello I am trying to use the following apache configuration on a Godaddy shared hosting account: <Files ~ ".*"> <IfModule mod_headers.c> RequestHeader unset Host RequestHeader append Host mydomain.com </IfModule> </Files> The above is contained in a .htaccess file. In other words... For all files and paths set the request's host to m...

Apache2 - authorize users against a Location using BasicAuth but ONLY for users outside local subnet

In my Apache 2 config I have a VirtualHost which looks something like this: <VirtualHost *:80> ServerName sub.domain.com # username:password sent on to endpoint RequestHeader set Authorization "Basic dXNlcm5hbWU6cGFzc3dvcmQ==" ProxyPass /xyz http://192.168.1.253:8080/endpoint ProxyPassReverse /xyz http://192.168.1.253...

How can I rewrite all but my IP address to the std. Apache 503 temporarily down error message?

Hi folks, I'm about to do some server maintenance and would like to rewrite requests to Apache's standard 503 temporarily unavailable message. I've Googled and found a few mod_rewrite snippets, but they all involve doing an [R=503] to a PHP script which then sends its own 503 headers and a hand-written message... which just seems ugly ...

My passenger powered Rails app sometimes needs a long time to load

I use Apache + Passenger to host some Rails applications. Something seems to go in a sleep mode when there is no request for a longer time. It then takes 10-20 seconds for the site to load. Feels like there is something that has to wake up when there have been no requests for a longer time. How can I fix that? I have enough RAM so it sh...

multiple request from same ip on Server logs

Hi SO, I implemented a client side interface which makes a service call to the server using JS in an http GET. When checking my access logs, I see that sometimes, I get multiple requests sometimes as many as 6 within a second-- Making the very same request-- from the same ip -- what do u think this tells ? Thanks ...

Is Apache Tomcat built on Apache Web Server platform?

Recently our Software Analytic provider (NETTRACKER) sent us a plugin in order to be able to capture visitors in a better way. This plugin is for Apache 1.x and Apache 2.x. They said and I quote that since Apache Tomcat is built on Apache HTTP server the configuration of the plugin should be the same. I have looked for a httpd....

Setting up Django with mod_python, Apache on SuSE with Alias

Hello guys, I'm having major problems getting Django working with my Apache configuration. I did not create the server, so I don't have too much leeway as to how the server works. Essentially there are three virtual hosts: board.site.org, students.site.org and insider.site.org The insider.site.org is the main one I'm concerned with. ...

Redirecting URLs (with specific GET parameters)

I have this old survey link that is has been superseded by another link, so basically I want anyone trying to access the URL: http://mywebsite.com/survey/view_survey.php?surveyID=1 To be redirected to: http://mywebsite.com/survey/view_survey.php?surveyID=2 Can I do this in the Apache configuration or htaccess file? I tried the foll...

How to tell Apache ignore/block 404 error and redirect to hander page?

The concept So, I've already made (upgraded actually) this website with its own Content Management System (CMS) that everyone likes. As with most CMS, the default behavior was the access pages with the ugly and utterly unhelpful url like such: www.mysite.edu/index.php?pageid=xxxx So the idea was to change it so that we could have "r...

PHP file upload problem

I've got a really annoying problem with file uploads. Users can choose a file in an html file field. When they submit the form, this file will be uploaded. On the serverside I just use standard PHP code (move_uploaded_file). I do nothing weird. Everything works perfectly. I can see the file on the server, I can download it again, ......

What's causing my java.net.SocketException: Connection reset?

We are seeing frequent java.net.SocketException: Connection reset errors in our logs for a component that calls a third party Web service that sends SMS messages. Our application is written in Java and is sat on top of Tomcat 5.5. It was written by contractors who are no longer with us. The current team has no real Java expertise, and w...

Measuring Apache Performance

As our servers gets busier I'm increasingly interesting in monitor what's going on over time, we have some our host offers some crappy graphs which show CPU usage and Memory over time but there not really telling me much. What sort of high performance tools are available to accurately monitor Apache? ...

Mod_rewrite repetition

I am working on a website that passes all PHP scripts through a single PHP page (passthrough.php). The .htaccess file is supposed to take certain special directories and translate them into GET variables, so the controller script knows what to do with them. So: http://example.com/ajax/method.php becomes http://example.com/passthroug...

Why use WAS-CE over Apache Geronimo?

What benefits do I gain by using IBM WebSphere Application Server Community Edition over Apache Geronimo? ...

Mod-rewrite has revealed itself

I thought that apache mod_rewrite would hide the URL that is being redirected to. i.e. if a user enters http://site.com/iPhone and i've set it up to redirect to http://site.com/search.php?search=iPhone I would have expected that http://site.com/iPhone would still be displayed in the address bar? .htaccess file is: <IfModule mod_rewri...

How to redirect different sub domain requests to different port

I have two applications, one is the www.myexample.com, another is the blog.myexample.com. I am using PHP and Apache. Now, I want to let www.myexample.com runs on port 82 of my machine, and blog.myexample.com on port 83, on the same machine. How to configure the apache and/ or the PHP scripts so that when the requests for the requests ar...

I want to host my own home web server. I installed Apache already but I can't log in other computers

Hi guys I'm using Windows Vista, I have Apache installed already. Apache is working great, but I want to allow my website to be viewed publicly. When I entered my ip address(the one hosting the website) on other computers, the page doesn't show up. It just loads but don't show up. How can I edit my httpd to allow everyone to have acce...

Redirection to different port for different sub domain Doesn't Work

I have two sub domains that are located on different ports. www.myexample.com locates on port 83 blog.myexample.com locates on port 82 I have done the following to my Apache configuration file: httpd.conf I incude three conf files, proxyserver.conf, mainhtml.conf and sidehtml.conf The content of proxyserver.conf is NameVirtual...