apache

Java apache poi setting the cell formula

I am try to set a cell formulat that references cells from other workbooks. However, when I open the programmatically generated workbook, the formula cells show up as #REF!. I print out the formulas that were generated in a log. If I cut and paste those into the cells, the numbers from the external workbooks is pulled in. Str...

making apache and django add a trailing slash

Hello. My /train directory is aliased to a script in httpd.conf by: WSGIScriptAlias /train /some-path/../django.wsgi And it works well, except for one problem. If a user goes to /train (with no trailing slash) it will not redirect him to /train/, but will just give him the right page. This is a problem because this way the relative lin...

How to remove date header from apache ?

hi everyone, I need to minimize Apache HTTP response headers, by now i reduced them as following HTTP/1.1 200 OK Date: Thu, 25 Mar 2010 21:57:41 GMT Server: Apache Content-Type: text/html I'd like to know if there is a way to disable Date and Server header, only for a certain virtual host. Thank you! ...

Is there a way to encode a URL in velocity template

Hi, Excuse my ignorance but I am new to Velocity and trying to fix someone else's problem. I need to encode a URL inside the velocity template. I create a url and as part of the query string I pass in a page name a user created. This page can contain special characters like ëðû. The url would look like http://foo.com/page1/jz?page=S...

How do you throw an HTTP error with mod_python

I have a setup where I'm serving simple python pages using the mod_python publisher. At some points I'd like to have the python function raise a standard apache error - for example throwing a 500 error if a required file is missing. How can I throw an apache error from within a mod_python script? ...

How to stop a curl while requesting or stop the running php script?

I using url to request remote urls that sometimes may very slow or just down. In this case, my php scripts still waiting for the response, it makes apache has to many requests stay in memory and then overload. I need a way to stop curl requesting or stop running php script when specified time passed. I'd tried declare(), it makes no sens...

Building a CMS in PHP: Development tools

I'm planning to build a CMS in PHP and MySQL, mainly for my own amusement and education. (Though who knows, I may come up with something useful and cool. Anything's possible.) I'll be asking questions about code architecture etc. later. For now, I'm more interested in development tools. So far, all my playing with code has been done on ...

Tomcat 5.5 - multiple contexts using same path

Is it possible to set up multiple contexts using the same path? For example: <Context docBase="/www/websites/site1/java/base" path="/base" reloadable="true"/> <Context docBase="/www/websites/site2/java/base" path="/base" reloadable="true"/> ...

Apache mod_rewrite %2B and plus (+) signs...

I'm using apache / mod_rewrite to re-write URLs but I am having problems with the plus sign. With the following rule.. RewriteRule ^/(.+[^/])/?$ http://localhost:8080/app/home?tag=$1 [P,L] Both: http://localhost/1+1 and http://localhost/1%2B2 end up as uri=http://localhost:8080/app/home, args=tag=1+2 So in both cases the appl...

Creating a personal URL for all users to my site

Hello all, When a user registers with my site I want to offer them a login page and a user area with the URL: http://user1.mysite.com http://user2.mysite.com http://user3.mysite.com ... I did a google search for this but I wasn't sure of the right terms... How can I do this without having to actually create lots of subdomains...

mod rewrite and automatic redirection

Hello! I have this rule written in my .htaccess: RewriteRule ^blog/([0-9]+)/? /obdelaj.php?ime=$1 Which works but it redirects me to example.com/obdelaj.php?ime=# and I want the user to stay on example.com/blog/# I have a hostgator account and I don’t have access to the httpd file, and I presume that a some configuration in httpd fi...

How to tell Apache to replace string in output

I'm working on a site on a test server. There are some links that use an absolute URL. Is there some way to tell Apache to replace those strings with the address of the test server? Thanks ...

$_SERVER['PHP_AUTH_PW'] not getting set when using a specific Apache location

So I noticed some odd behavior with Apache today. It appears that when I change my location from "/" to "/somedir" that PHP does not properly set the $_SERVER['PHP_AUTH_PW'] variable. I am not sure why this is happening nor do I know where to go to see why it could not be getting set. I am using PHP5 and Apache2 with LDAP as my authenti...

Serving files (800MB) results in an empty file

Hello, with the following code, small files are served fine, however large (see, 800MB and above) result in empty files! Would I need to do something with apache to solve this? <?php class Model_Download { function __construct($path, $file_name) { $this->full_path = $path.$file_name; } public function e...

Need to have testing server work with https: but don't have an SSL

I'm working on an online store. I have it setup on my testing server. I'm having a problem where when it goes to the checkout functions it wants to start calling https pages. I don't have an SSL certificate for this server. Is there something I can do with Apache to get this to work? Mod_Rewrite perhaps? I've played a little with rewrite...

Intermittent PHP error: Undefined core function?

In the last week I've been coming across an incredibly annoying error on one of Slicehost slices. It appears that every now and then PHP will fail with a fatal error, saying a certain function is undefined. The function changes, but is always a core PHP function e.g. defined(), version_compare(), etc. This problem has occurred while usin...

URL redirect/remapping to a Django app, using DNS or Apache

Typically I've been lucky enough to have a fairly simple Django and Apache configuration. But now I'm writing several apps that will sit on the same server and I need them to each have individual domains. The apps live at www.myserver.com/app/app1 (app2...) and I would like to access it using www.someawesomedomain.com. I don't want a...

Ignore all folders with a certain name in SVN (subversion), how to?

I am fairly new to Subversion and was wondering how exactly to ignore all folders by a specific name. From what I have read, I think I need to use the svn:ignore function, but I have no clue on how to actually do this. Some places mention a config file.. some say command prompt. I have my subversion repo set up on a windows 2008 ser...

Possible apache/mysql/php wrapper?

I was tasked with writing a smallish program for data input and manipulation. My language of choice happens to be PHP. I have written out the program/site it all works fine is easily portable and everything but have one question. Is there anyway to wrap up apache/mysql/php into a bundle of one exe? I know of MoWes Portable and other opti...

how do I redirect from a subdirectory to another directory, but strip off the original subdirectory from the URI using mod_rewrite

I have a Ruby on Rails app running on 12001. I am currently redirecting a subdomain to 127.0.0.1:12001 using some ReWriteCond detection. Now I want to redirect my subdirectory to that rails app. http[s]://domain.com/redmine to 127.0.0.1:12001 The current rules apply REQUEST_URI to the above rails path, but I need to strip "/redmine...