apache

Why can Wordpress suddenly connect to the MySQL database server once I update the host from "localhost" to "mydomain.com" when I have VirtualHosts set up in Apache?

This is a specific variation on the "can't connect" problem. In my case, I've just set up two virtual hosts in my httpd.conf listening on port 80. The declaration looks like: NameVirtualHost *:80 <VirtualHost *:80> ServerName site1.dev DocumentRoot /www/site1 </VirtualHost> <VirtualHost *:80> ServerName site2.dev Do...

How to dynamically redirect www-based URLs to non-www URLs with multiple domains in same VirtualHost

I've got a VirtualHost that looks something like: <VirtualHost *:80> ServerName domain1.com ServerAlias www.domain1.com domain2.com www.domain2.com </VirtualHost> When someone visits www.domain1.com/test, they should be redirected to: domain1.com/test When someone visits www.domain2.com/test, they should be redirected to: d...

Setting up Django on an internal server (os.environ() not working as expected?)

I'm trying to setup Django on an internal company server. (No external connection to the Internet.) Looking over the server setup documentation it appears that the "Running Django on a shared-hosting provider with Apache" method seems to be the most-likely to work in this situation. Here's the server information: Can't install mod_py...

Where does the tomcat axis file server-config.wsdd come from?

Part of our system provides a web service through apache tomcat, the service is referenced in the server-config.wsdd file. Unfortunately nobody can remember how it got in there. The apache set up has changed, and I need to update the system for the new configuration. What magic keywords can I google for to help me work out how and why it...

Dynamic DNS on your own server

I have a server in at a hoster (which has a static IP) and want to run a server at home too and don't want to buy the dyndns package from dyndns.com I would either like to find a program that does this without costing money and using my own server and domain so I can have myclient.domain.com or I would like to write this myself. Would ...

Apache2 child_init server_rec does not match request's server_rec?

Using the apache2 C api, I have created a child_init callback (registered through ap_hook_child_init) that is supposed to set up a per-process resource when the server is first started. Then, as each request comes in through the handler (registered through ap_hook_handler) I want the handler to look up that resource for its own use. Cur...

Do I have to include libs in every tile within Apache Tiles?

I am using Tiles within my web-application. I have a standard-layout (standard.jsp) within the tiles are used. On top of the standard.jsp are a lot of includes, concerning tag-libraries and such. Let's do a simplified example. standard.jsp: <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ inc...

Which to use on low spec CPU?

Hello, I have a dedicated server where i'm only the user in it. Processor : AMD Sempron 3100+ Memory : 1GB DDR I I'm using PHP for website. Its mostly used for downloading stuff and uploading and so. I currently using apache, it eats too much processor. So i came across few better then apache. I need to know which one of this good ...

website monitoring

I have a few websites on different servers, Is there anything quick and easy to setup, so those website will be monitored? I just need to know the website is accessible or not. ...

Mod Rewrite Question - forwarding parameters to new parameter names

Hi, I've tested the following Mod Rewrite on MAMP, but for some reason, it fails on LAMP. Any idea of what I am doing wrong? RewriteEngine on RewriteCond %{QUERY_STRING} ^newParamA=(.*)&newParamB=([0-9]*)$ RewriteRule ^newfolder/newsubfolder/$ oldfolder/oldsubfolder\.php?oldParamC=%1\&oldParamD=%2 [QSA,L] The idea is that a query suc...

Help with mod_rewrite

...

AJAX Call to PHP script gives me 500 Internal Server Error??

Hi I make an AJAX request like so using JQuery: $.ajax({ type: "GET", url: "getvideo.php", data: 'videoid=' + vid, I use firebug to tell me whats going on and it tells me a 500 internal server error has occurred? wtf Here is part of the script concerned: $videoid = $_GET['videoid']; $get = new youtubeAPI(); $get...

What is the source of /path/(null) requests?

We are beginning to see requests in our Apache Logs in the form /abc/(null) These requests all have MSIE 8.0 and Trident 4.0 in the User-Agent field. The requests began to appear when we hadn't deployed any changed code for several weeks. What is the source of these requests? Is this a bug in MSIE 8? What is a systematic way to d...

Can I make a single Perl module act as multiple kinds of mod_perl handlers?

I'm writing a series of related mod_perl handlers for various login-related functions in Apache, so my Apache config file looks like this (for example) PerlAccessHandler MyApache::MyAccess PerlAuthenHandler MyApache::MyAuthen PerlAuthzHandler MyApache::MyAuthz Each of the modules (MyAccess, MyAuthen, MyAuthz) defines a sub handl...

apache ant build files

Hi, I am trying to output the timestamp after each step (target). When excuting the below build file by ant testtime i get the output: Buildfile: build.xml testdepend1: [echo] ****** Start: test depend 1 ****** [echo] ****** Finish: test depend 1****** [echo] 02/12/2009 11:58:07 AM testdepend2: [echo] ****** Start...

Why does Apache complain that my mod_perl program "disconnect invalidates 1 active statement handle"?

disconnect invalidates 1 active statement handle (either destroy statement handles or call finish on them before disconnecting) The following code which grabs data from MySQL gets executed successfully, but will cause Apache to generate the above message in its error log: my $driver = "mysql"; my $server = "localhost:3306...

PHP mssql_connect works in Command Line but not Apache

Just wanted to share an issue I was experiencing trying to connect to a remote MSSQL Server with mssql_connect(), from a ubuntu box. With identical php.ini files and correct permissions the connect would be established when I ran the connection script through the command line, but not in the browser. ...

Apache redirects (<whatever>.mydomain.<whatever> to mydomain.com)

In a virtual host in apache I would like to redirect all requests to <anything>.mydomain.<anything> to just mydomain.com. However, the below rewrite rule is ignored for some reason. Why? RewriteCond %{REMOTE_HOST} ^.*mydomain.* RewriteRule ^(.*)$ http://mydomain.com [R=301,L] ...

How do I use .htaccess to redirect an aspx page to a php page?

I recently moved from a asp.net host to a PHP host. I am trying to setup 301 redirects of my old urls using .htaccess. Here is what I want to accomplish: old url: http://www.vasanth.in/downloads/download.aspx?file=file.zip new url: http://www.vasanth.in/downloads/download.php?f=file.zip I tried the following: RedirectMatch 301 /downl...

Remove all query strings from requests for particular page.

I have a flex application that for some reason I do not know why, when you are using google chrome and access the page with any query strings in the URL the applications behaves unexpectedly. The page does not need query strings though. But many things like adwords etc are passing variables in query strings for tracking purposes. But f...