apache

apache rewrite map redirect to 404

My Situation: I implemented an apache Rewrite Map to redirect incoming requests based on a database RewriteEngine On RewriteMap dbapp prg:/usr/local/somewhere/dbapp.rb RewriteRule ^/(pattern)$ ${dbapp:$1} [R] So far everything works fine, but I want to decide in the dbapp.rb script weather to redirect or give the client a http-sta...

Setting subdomain in ubuntu in LAN

I have created some domain in /etc/hosts files 192.168.0.11 domain-11.com 192.168.0.12 domain-12.com 192.168.0.13 domian-13.com and also created a files in /etc/apache2/site-avalaiable/ in respective machine like in machine 192.168.0.11 added a file domain-11.com my /etc/apache2/sites-available/domain-11.com files contains <...

What are the return values for apr_file_open()?

I want to be able to differentiate between "file not exist" and "other" errors when opening a file using apr_file_open(). It seems like the official documentation at apr_file_open doesn't list expected return values or even file permission enums. Anyone can point me to more documentation on it? ...

Incorect redirection after omitting a trailing slash (.htaccess)

Hello, I have the following .htaccess file and I would like to know how can I edit it in order to add the trailing slash and keep the same url. Right now, if I access a link without a trailing slash, it adds the slash but it loses the 'www.' in front of 'mywebsite.com'. Any ideeas? Options +FollowSymLinks RewriteEngine On RewriteBas...

Intermittent Tomcat ClassNotFoundException for some jsp pages

Hi guys, We have two tomcat servers load-balanced behind apache. Several times now we'e gotten reports of a 500 error on a page. Checking shows the following error, but only on one of the tomcats: java.lang.ClassNotFoundException: org.apache.jsp.jsps.userLogin_jsp at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at j...

Special URL formatting for Java Web Apps

Its best to just show what I'm trying to achieve. This isn't meant to be functional, just describe the problem. Here's what my tomcat web app currently accepts... /.../mywebapp/doSomething.jsp?id=somenumber. I want it to look like /.../mywebapp/somenumber What is this concept called, and does anyone have a good resource on it ...

Building a massively scalable and secure social network on top of Eureka Streams?

http://en.wikipedia.org/wiki/Eureka_Streams http://www.eurekastreams.org/ Eureka Streams uses a shared nothing architecture. It uses Memcached, Apache Maven, PostgreSQL and Hibernate. It uses Shindig for OpenSocial. It makes use of Java Message Service (JMS), Java Persistence API (JPA), Lucene and Google Web Toolkit (GWT). It ma...

Mapping domain name to linux server

I bought a domain name with GoDaddy.com. I have a Ubuntu linux server running with Rackspace Cloud. On this server, I have Apache up and running. My question is this: How can I set up my domain to point to my server with Rackspace Cloud. More specifically, I want http://www.mydomainname.com to map to my Apache server. I am assuming th...

Is it worth getting a clean error log on production site?

2 days ago we switched in our office from PHP 5.2.x to 5.3.x and it caused some problems at first, but we managed to fix 'em pretty fast. Since lots of bugfixes were done by looking at error logs, something popped up in my mind. Well, there are all these PHP Notices about undefined variables and other, as I consider, not urgent, messag...

How to answer a 501 Exception from Apache without Response Header?

I need to access the header to implement methods for a self written client on a mobile phone. The page should be accessible from J2ME without complete Request/Response Headers (Uses less traffic. For Example: J2ME sends only "G i\r\n\r\n"). Is there a way to get this working? (no matter how) ...

Passenger 2.2.5 - Apache turn off friendly Error Messages

I'm in production mode with Passenger 2.2.5 and Apache and would like to get rid of the friendly error messages. Preferably I would just like to see a 404 if anything goes wrong. I know Passenger 3.0 offers the PassengerFriendlyError off option, but afaik, 2.2.5 does not. ...

PHP include/require a different extension file as .php

I have a .js file with code compatible for both php and js languages. The file is read and edited by php and then fetched by JS. so the extension is JS, is there any way that i can require this file in my php script and the file may execute normally as a require/include would work on a .php file. I dont want to Eval the file contents in...

Apache not recognizing a .zip file within document root

I have apache 2.2 running with mod_rewrite as user/group www/www. I'm using the directive RewriteCond %{SCRIPT_FILENAME} !-f So that any actual file that exists in a document root is accessible. There are multiple .zip files in the same directory that are downloadable, one of which is larger than the file that will not download. You...

XSendfile won't serve the files in apahce2.2

I'm using mod_xsendfile (v0.12) from https://tn123.org/mod_xsendfile/ to serve static files where Django is controlling access to the files based on users and permissions. In my conf file, I have: XSendFile On XSendFilePath e:/documents/ Order allow,deny Allow from all In my django code, I set the headers like so: assert(isi...

How to setup a local xampp behind my company's proxy

I am trying to do curl requests through my local xampp setup but my company has a firewall proxy that needs to authenticate on port 8080. Can I have apache login to this proxy authenticate and complete the curl requests? ...

apache redirecting with 301, instead of internal rewrite

I'm trying to map/mask a subfolder to a different folder on the same server. I've done it plenty of times before but I can't get this to work properly. I want the user who accesses directory "a" to see "oldsite/a" instead, but I do NOT want them to be redirected, or to see the new address in the browser. <IfModule mod_rewrite.c> ...

Replace %26 in htaccess to something else

Hi all, Basically I'm importing a bunch of pages that have ampersands in the title, from Mediawiki. These are encoded as %26. Drupal, for various reasons, has decided double encode the url it to have it become %2526. I simply can't create the alisis within Drupal so I have to use htaccess tl;dr: I need example.com/something_%26_else ...

git push large files fatal remote end hung up unexpectedly - apache proxypassreverse issue

Hi all, I have just setup git-http-backend on a WS2008 machine using Apache and Basic Auth for pull and push. I can create a bare repository on the hosting server and clone it down with git clone http://[email protected]/repositories/Test.git This works fine, I can add files and push them back. That all works great. I thought I had it...

How does Code Igniter know that index.php is not a directory?

My Code Igniter app has urls like this: http://servername/contexttroot/index.php/Sessions/login/ My question is, when the url is parsed how does Apache know that there isn't a folder called index.php? If I were the parser, that's what I would be looking for :) I know it works and CI's index.php gets called but I don't understand how t...

UPDATE CakePHP - The requested URL was not found on this server

INSTALLING CAKEPHP FOR DUMMIES If you are like me, you are frustrated with these frameworks like Ruby on Rails and CakePHP, which promise rapid development, despite sluggish start - simply spending hours on install. To get CakePHP running, throw out the tutorials and don't even bother buying the books or reading the documentation. None...