apache

Apache/mod_rewrite > Tomcat encoding %26 and "&"...

Apache is the front-end to my web app then I use mod_rewrite to proxy the request to JBoss. So far this sounds pretty standard, but the problem I am having is: if I access the app directly through jboss @ http://localhost:8080/app/page?raw=foo%26bar&page=1: request.getParameter("raw") = foo&bar If I access the app through Apache @...

How do i convert this Mod_rewrite rule to nginx

This is the Htacces rule: RewriteEngine on RewriteRule ^([A-Za-z0-9-]+)/?$ ir.php?id=$1 how should I pass it to a Nginx compliant rewrite rule... i read the doc and did this: rewrite ^([A-Za-z0-9-]+)/?$ ir.php?id=$1 last; But didnt work. and another question: Is there any equivalent of .htaccess to Nginx (per directory rules) Thank...

Error in django using Apache & mod_wsgi

Hey, I've been doing some changes to my django develpment env, as some of you suggested. So far I've managed to configure and run it successfully with postgres. Now I'm trying to run the app using apache2 and mod_wsgi, but I ran into this little problem after I followed the guidelines from the django docs. When I access localhost/myapp...

Grails URL's with Tomcat/Apache ProxyPass

Grails tends to write out the URL for everything that uses its tags as /appName/whatever. For instance, if I use the tag: <g:javascript library="jquery"/> the resulting tag is <script src="/appName/jquery/jquery.js"></script> This causes an issue with using ProxyPass with Apache/Tomcat. All of my CSS, JS, Images and links have th...

mod_rewrite to find missing /img/foo.jpg in /img/f/

I've got a folder of images which is reaching a critical mass after a few years. I want to move images into alphabetical folders, so that /img/foo.jpg goes into /img/f/foo.jpg and /img/bar.jpg goes into /img/b/bar.jpg and so on. In order to make the transition smooth, and to allow the manual uploaders to put stuff into the top level, I...

apache mod_proxy_html on Ubuntu ProxyHTMLEnable not working

I'm trying to use mod_proxy_html on Ubuntu which I installed from apt-get. The module is loading properly and all ProxyHTML* directives work except for the one that matters the most. When I do "ProxyHTMLEnable on" in my apache2.conf or vhost conf files, apache complains that it's an invalid directive and I must have misspelled it. Is ...

Mod rewrite for fake subdomains?

Hello, I really tried tons of methods but i'm not successful. I want a .Htaccess code to do the following : I want to rename this : http://www.mydomain.com/media --> http://media.mydomain.com So, By example instead of calling this : http://www.mydomain.com/media/XXX/picture.jpg i will call : http://media.mydomain.com/XXX/picture.jpg ...

What could cause these Apache crash errors ?

Hello guys. I had a server crash several days ago. I use Cacti to keep stats: at the time when the server crashed, a huge spike from Load 1 to Load 200 occurred, with over 800 processes in the run queue ( from 300 average). Upon checking /var/log/httpd I notice this: * glibc detected /usr/sbin/httpd: double free or corruption (out)...

Server-side web browser for PHP?

If you wanted to re-create the DOM server-side and manipulate it in PHP, how would you choose to go about it? I'm looking for a fast, multi-user complete server-side web browser that can interface with PHP and run complete Javascript. Like Jaxer but something I can use with PHP... an extension would be fine, or even an Apache mod. Ide...

Why is Apache seg faulting?

We have a production server that seems to Seg Fault a few times every day. The fault is picked up by Apache and logged in the error log - but there seems to be no traffic around the time. If it's a request generating the fault then it looks like it happens before any other logging is made so I can't see how it's happening so it's very ha...

index.php is not opening and running as download the file!

Hi friends, when I run the url at localhost for a php file like: http://localhost/project/admin/ it doesnt open the index.php, but gives panel for downloading the file with the message below :/ You have chosen to open which is a: application/x-httpd-php from: http://localhost What should Firefox do with this fil...

Redirect to Apache built-in 404 page with mod_rewrite?

Is there a way to actively serve Apache's default, built-in 404 page for a number of URLs using mod_rewrite? Not a custom error document, but a rule like RewriteCond %{REQUEST_URI} ^/dirname/pagename RewriteRule -- serve 404 page ----- I know how to build a PHP page that sends the 404 header and have mod_rewrite redirect all the URLs ...

SSL Certificated Validity

Hi, I'm using an SSL certificate from geotrust. I just ordered and installed it this weekend. However when I try to access my website using https, firefox (and the other browsers as well) the browser warns that the certificate expired a few days ago. I guess there could be two reasons: I made a mistake during the installation of the c...

Does mod_rewrite in subdirectories' .htaccess override higher levels?

I'm using mod_rewrite to map my old directory structure to a new one. I have the following rule in my top-level .htaccess file, and it works: RewriteEngine On RewriteCond %{REQUEST_URI} /blog/archives/(.*) RewriteRule ^.*$ /archives/%1 [L,R=301] As you can guess, this takes http://example.com/blog/archives/00001.php and redirects it t...

PHP does not work over ssl connections

Hi, I just got my ssl certificate to work for the first time. For some reason when I connect to my website using https my browser tries to download the php file. I have the following line in my httpd.conf. Isn't this the line which makes sure php files are run using php? AddType application/x-httpd-php .php What else do I need to ch...

What is optimal hardware configuration for heavy load LAMP application

I need to run Linux-Apache-PHP-MySQL application (Moodle e-learning platform) for a large number of concurrent users - I am aiming 5000 users. By concurrent I mean that 5000 people should be able to work with the application at the same time. "Work" means not only do database reads but writes as well. The application is not very typical...

[Apache] Creating rewrite rules for multiple urls in the same folder (solved)

I have been asked by our client to convert a site we created into SEO friendly url format. I've managed to crack a small way into this, but have hit a problem with having the same urls in the same folder. I am trying to rewrite the following urls, /review/index.php?cid=intercasino /review/submit.php?cid=intercasino /review/index.php?c...

how do i use htaccess to make http requests work properly

I currently have css and javascript file calls (amongst other things) like the following: href="/css/default.css" src="/js/ui_control.js" putting the preceding / in to make the files relative to the root. This works great when my page is in the root of the domain. However, I'm currently in the middle of transferring my site to a new h...

Whats the best way to get multiple instances of an application to run in Apache Tomcat?

I have an application that usually is hosted on a Windows 2003 Apache Tomcat server and integrates with clients websites. We were thinking about using Amazon's EC2 service as an alternative so we can work within a predictable hosting environment. Unfortunately, and for obvious reasons, you only get 5 Elastic IP addresses (static ip ad...

Apache with mod_dav_svn starts to consume a lot of memory

Sometimes Apache with mod_dav_svn starts to consume a lot of memory. Today Apache(httpd.exe) consumed about 600M. And there was a lot of java.lang.OutOfMemoryError in Hudson when it tried to update working copies for some jobs. What can I do in order to fix this problem? ...