apache

Rails app Hangs and Ruby uses 100% CPU

I have an apache2 server running Phusion Passenger. On this machine I have two virtual hosts setup each look like this (path's are different for the 2nd virtualhost...but other directives are the same) ServerName beta.mysite.us DocumentRoot "/var/www/beta/mysite/public" <Directory "/var/www/beta/mysite/public"> RewriteEng...

Understanding apache RewriteLog

I'd like to understand the output from RewriteLog in apache2. I have something like ...... (3) applying pattern '^/img(.*)' to uri '/api/marker/2' ...... (3) applying pattern '^/img/imagecache/(.+)' to uri '/api/marker/2' ..... (1) pass through /api/marker/2 .....

How to write this rewrite rule in Apache?

If user visits /abc, and there is no file/directory named abc under /,redirect it to /test.php?from=abc, but if it exists,don't redirect. ...

How are the Apache Solr search results sequenced?

I have Apache Solr 6.x-1.0-rc3 module installed in my site and it works fine. I wanted to know how are the Apache Solr search results sequenced. I have tried a few things and have concluded that it's not alphabetical or according to the recently updated node. How are the search results sequenced? I mean in what order or logic. ...

optimizing Pretty URLs in .htaccess

This is the code I use, <IfModule mod_rewrite.c> RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^([^/]+)/?([^/]+) index.php?user=$1&do=$2 [L] </IfModule> if i give it abcd/1234 it will capture abcd first then 1234 as the second variable. But if the url was abcd/ or abcd the first capture stays th...

Need help with some tricky .htaccess password rules

The issue I have a site that's a few weeks away from launch, so I've put a htaccess Require directive on it, to keep nosy people out until launch. But now I need to open up (i.e. not require a password) for 2 specific URLs, because a payment-processing service needs access to them. And for some reason I just can't get it to work! The ...

port pipes all requests to a php file

how can I setup httpd.conf so that I can pipe all requests to that port go to a php file? I am trying to make a socket connection from action script to localhost in flash. ...

Location of web app on my server and Apache.

I'm having a rough time with Apache and my Rails app on my production server. I have everything installed, libraries, gems, the whole get down. The issue is that I get a "Forbidden" error in my browser. I've even chmod'd my app directory with "777" but still no luck. So my questions are: What is your ServerName Directive (in your virt...

Wordpress .htaccess errors

Thanks in advance to all you .htaccess guru's out there. I'm having an issue that's been bothering me for some time. I have wordpress nested inside my own site folder structure. To the user, everything is cool. But when i go to www.domain.com/blog/wp-admin, my credentials will not log in. It just keeps looping me around to the same ...

What causes "suexec policy violation" when Perl is called via server side include?

I'm working on a Perl script which is called from a server side include on an Apache 2 server. The script is displaying the generic "Internal Server Error" page rather than showing me the actual error. When I check the Apache error log, I see these messages: unable to include "/foobar/index.pl" in parsed file /home/foouser/domains/foosi...

Encode params used within a post

Hello Experts! I need to encode the params to ISOLatin which i intend to post to the site. I'm using org.apache.http. libraries. My code looks like follows: HttpClient client = new DefaultHttpClient(); HttpPost post = new HttpPost("www.foobar.bar"); post.setHeader("Content-Type", "application/x-www-form-urlencoded"); HttpPa...

How do I implement cookie based auth for a Perl website on shared hosting?

I'm very new to Perl, and I have absolutely no idea how to approach this. We have an old Perl application which previously used Apache auth; we'd like to replace this with a cookie based form-style authentication. I understand that this is very case-specific, and there is no one answer as such, but some general tips would be much appreci...

Apache+Tomcat6+Struts2 redirect problem

I'm using apache on 80 port, that forwarding all requests on tomcat6 on port 8080. In my application I'm using struts2 framework. In tomcat I'm using redirect from ROOT application to my application "MyApp". When I walk on the links on my site I see good URLs like www.mysite.com/order But when struts redirects me anywhere URLs take ...

Django sub-url deployment on Ubuntu server

Hello, I need to set up a django development environment that is publicly viewable on the internet (I am doing this for school, and my projects need to be viewable by my professor, this isn't a setup that needs much security). I have a virtual server running Ubuntu 8.04 LTS. I need to have multiple django applications running in subdir...

How do you trace 500 server errors with Apache + mod_python + Django?

I'm randomly getting 500 server errors and trying to diagnose the problem. The setup is: Apache + mod_python + Django My 500.html page is being served by Django, but I have no clue what is causing the error. My Apache access.log and error.log files don't contain any valuable debugging info, besides showing the request returned a 500....

long url rewriting with htaccess

here is my url http://www.mydomain.com/browse.php?type=3d&amp;subtype=started&amp;ref=foo how an i convert this to... http://www.mydomain.com/browse/3d/start/foo i have seen many questions on stackoverflow but none have given and related ans to my prob... ...

PHP: What does pcntl_fork() really do?

PHP's pcntl_fork funcion is supposed to fork a process just as the standard fork function in C. But I was wondering if this function really forks the process or if it emulates that behavior in a different way. If it really forks the process then it's clear which process that is: one of Apache's child processes. That's OK as long as Apach...

[Apache] RewriteRule removing trailing dot.

Hi, here is my .htaccess rules: RewriteEngine On RewriteCond %{REQUEST_FILENAME} -s [OR] RewriteCond %{REQUEST_FILENAME} -l [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^.*$ - [NC,L] RewriteRule ^(.*)/(.*)$ index.php?var1=$1&item=$2&var2=%{REQUEST_URI} [NC,L] RewriteRule ^(.*)$ index.php?var1=$1 [NC] here is an url: http://loc...

How to setup apache redirect or custom 401 document on Kerberos SSO login failure

Hi I have a working Kerberos SSO setup, I use apache and jboss with mod_jk. Apache is protecting (by kerberos) the auto-login.htm page with the following configuration: <Location /auto-login.htm> AuthType Kerberos AuthName "Kerberos Active Directory Login" KrbMethodNegotiate on KrbMethodK5Passwd on KrbAu...

C#: get Client-IP after ProxyPass

My ASP.NET application checks the IP of the calling client. But I have to host it behind a Linux-Box where Apache redirects it to an internal Windows 2003 Server running IIS like: ProxyPass /srs http://192.168.21.15/srs/ where 192.168.21.15 is the internal IP of the Windows-server, and 192.168.21.1 the internal IP of the Linux box ...