apache

Email to be sent out from a dedicated server with different IP

We have three domains hosted on one dedicated server each with its own dedicated IP. Domain A - Has the server primary IP address (default server IP) Domain B - Has its own IP address Domain C - has its own IP address If an email goes out from Domain B then it uses the Domain A IP address in outgoing and this makes emails from Domain ...

VirtualHost configuration

Hi, I need to configure two name-based virtual hosts in my ubuntu pc. If I type the address "http://mypage1" in browser, it should display my first customized html page and if I type the address "http://mypage2", it should display my second customized html page. I tried out the following: 1. installed apache 2. created a file mypage1 ins...

RewriteRule being greedy

I have been looking for an answer for a few hours now, so sorry if this was asked a ton of times, I missed it. I basically want to make a rewrite to ignore the first directory. That first dir in the path will be different so I thought I could use a regex. But my regex is matching all the way to the file name: RewriteRule ^([a-z]+)?/(.+...

How to rewrite image/<text>-<imageID>-<text> to image/ID.jpg ???

Hi everyboy, I used to have PHP websites and using url rewriting on picture to have SEO friendly urls, On php I had links like /image/blablablabla-1234-blablabla rewriting to: /image/1234.jpg by using a url rewrite rule on apache .htaccess file. So I would like the structure /image/<text>-ID-<text> to return /image/<id>.jpg reguardl...

XAMPP Mercurial installation on Windows Apache --> HgWebDir.cgi Script Error

I try to publish multiple existing mercurial repository-locations though XAMPP Apache via CGI Python script hgwebdir.cgi ... as in this tutorial http://mercurial.selenic.com/wiki/HgWebDirStepByStep I get the following error from the apache error logs, when I try to access the repository path with a browser: Premature end of script head...

Moved site, make old links redirect with .htaccess? From sub.mydomain.com to mydomain.com

I recently moved my blog from http://blog.mydomain.com to http://mydomain.com My problem now is that I have sites linking to the old addresses. What can I put in my .htaccess file to make, for instance, http://blog.mydomain.com/my-post-title-here go to http://mydomain.com/my-post-title-here Thanks in advance! ...

Using mod-rewrite to conditionally select existing file in a subdirectory based on Host header?

I'm working through a problem where I want to select a different static content file based on the incoming Host header. The simple example is a mapping from URLs to files like this: www.example.com/images/logo.gif -> \images\logo.gif skin2.example.com/images/logo.gif -> \images\skin2\logo.gif skin3.example.com/images/logo.gif -> \imag...

Prevent Apache from logging 404 Errors, logging all other errors

I would like to disable 404 errors from appearing in my Apache error logs. The reason for this is that I have a custom page that handles 404 errors, performing any necessary redirects. If no valid redirect is found in this 404 page, then a nice page appears and the url and other information are logged by the script. Because of this, I do...

Block direct access to a file over http but allow php script access.

I'm loading my files (pdf, doc, flv, etc) into a buffer and serving them to my users with a script. I need my script to be able to access the file but not allow direct access to it. Whats the best way to achieve this? Should I be doing something with my permissions or locking out the directory with .htaccess? ...

Supporting twitter-like user page urls with apache/php?

Hi, I'm using php on apache with mysql. I want to let users enter a url into their browser to see a custom user page for themselves, just like twitter does. For example, they could enter urls like: www.mysite.com/johndoe www.mysite.com/janedoe and see that user's page. How could I do this with php and apache? I don't want to create ...

What is the maximum number of pages tha apache fop can generate ?

Hi I was working with apache fop and when the number of pages exceeds about 130 pages ,it could not generate the pdf .... Is there any limit to page number or the length of xml file... Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.io.BufferedReader.(BufferedReader.java:80) ...

Where to get apache poi port for .net

I would like to know if there is a website where I could download the Apache POI ported for .net? I already found this link in the web http://www.apache.org/~avik/dist/poi-2.5.1-dev-20040708.dll I also found a repository of poi.net from novel but it is quite old (2004) http://developer.novell.com/wiki/index.php/Poi.Net But the version...

Running SQLite 3 in MicroApache

I'm running MicroApache (http://microapache.amadis.sytes.net) on Windows XP and would like to use SQLite 3 databases. The PHP version is 5.2.9-2. My MicroApache version has SQLite 2 support through 2 lines in the php.ini: extension=php_pdo.dll extension=php_sqlite.dll I test whether the extension works in 3 ways: 1. phpinfo() 2. exten...

Apache Axis 1.4 problem with generics or composite datatypes

Hello, I have a class XMLDataCarrier which has a map attribute Map (Integer, XMLDataListWrapper)catPriorityXMLDataMap. The class XMLDataListWrapper has just a list of strings private List (String) xmlString; All classes i.e. XMLDataCarrier,XMLDataListWrapper implement serializable and have serializable id This data is exposed via a we...

w3c validator: local installation on windows

i am trying to install w3c validator locally on windows xp with apache server. I am following this document http://validator.w3.org/docs/install_win.html but when i validate some site i am getting this error SGML::Parser::OpenSP version 0.991 required--this is only version 0.99 at C:/www/validator/httpd/cgi-bin/check line 60. BEGIN fai...

Netcat / Apache solution to send data to PHP

Hi, I have this device that sends XML data to a webserver in format as follows POST HTTP/1.1 Content-Type:text/xml Content-Length:369 Followed by XML The problem here is that apache simply sends 400 error for this and does not work. Is there anyway to create netcat to read xml and send to php? Any other solution welcome! Is it better...

Apache - Restrict to IP not working.

Hi, I've a subdomain that I only want to be accessible internally; I'm trying to achieve this in Apache by editing the VirtualHost block for that domain. Can anybody see where I'm going wrong? Note, my internal IP address here are 192.168.10.xxx. My code is as follows: <VirtualHost *:80> ServerName test.epiphanydev2.co.uk DocumentRo...

Jquery Apache - IE problem

I'm having a button tag on my page with a value. <button class='btn' value='value'>show value</button> I have this jquery code : $('.btn').click(function() { var w = 'value = '+$(this).val()+' / text = '+$(this).html(); alert(w); }); In FF, no problem the result is ok (display: value = value / text = show value). The ...

.htaccess: RewriteCond syntax?

I'm using Drupal 6. Typically, when the user requests a URL for which Drupal has no response, it uses index.php as the error document. However, I'd like to suspend this behavior for a specific URL. How can I do this? RewriteCond %{REQUEST_FILENAME} !=fail RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d ...

Why can't the w3c validator load Perl's SGML::Parser::OpenSP?

I have installed W3C validator locally on Windows, following their instructions. I am getting this error while validating a site: Can't locate loadable object for module SGML::Parser::OpenSP in @INC (@INC contains: C:/www/perl/site/lib C:/www/perl/lib .) at C:/www/validator/httpd/cgi-bin/check line 60 Compilation failed in require...