apache

load balancing in php

I have a web service running written in PHP-MYSQL. The script involves fetching data from other websites like wikipedia,google etc. The average execution time for a script is 5 secs(Currently running on 1 server). Now I have been asked to scale the system to handle 60requests/second. Which of the approach should I follow. -Split function...

Accessing SSL Private Key From a Servlet

I'm running Apache Tomcat locally and have installed a self signed certificate using OpenSSL. I also have a servlet running. What I want to do is the following: The servlet takes in POST parameters and will echo back the parameters signed using the PrivateKey of the server. That is, treat the input parameter as an integer and raise it ...

Apache CXF WSDLToJava Error: operation already exists. How to bypass?

I am developing second client application that is consuming existing SOAP web-services. I generate Java from existing WSDL using the latest Apache CXF 2.3 tool wsdl2java -client -ant http://172.20.0.22/someletters/TradingServer.asmx?WSDL and get WSDLToJava Error: java.lang.IllegalArgumentException: An operation with name [{urn:somesc...

Setting up Apache for Rails production. Please help!

Hello! I am developing a Rails 3 application and I have installed Capistrano on the client side and Passenger with Apache 2 on the server side. I make a deployment and the files are sent to a folder called u/apps/. But when I visit the IP address I am currently using I only get to an empty folder, how do I configure apache to look for...

How do I get the number of requests per second from Apache log between 2 dates/time?

What command can I use to analyse Apache's log file that tells me between 11am of day x and 13pm of day x the average request per second was..? The os is linux (red hat) Thanks ...

http://localhost not working

i am using xampp 1.7.1 PHP 5.2.9 pinged localhost on cmd and it showed Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms Reply from ::1: time<1ms hosts file has 127.0.0.1 localhost 127.0.0.1 localhost.com 127.0.0.1 www.localhost.com any other ideas? http://127.0.0.1 and http://ipaddress works ...

Url rewriting causes Magento admin to become inaccessible

I have magento in a subdirectory in the root and if I set the secure base url and secure base url link to the correct shared ssl url to enable secure pages I have no problem in the FRONTEND. The pages displays as they should. However when I try to access the admin with the secure link below I cannot gain admittance. For instance in the...

[HTACCESS] Redirect to a .html if from some domain

Hi! I have two domains that are pointing to the same directory, but I would like to redirect them (via mod_rewrite in htaccess) to some specific .html when hitting home. Like: if (domain == 'firstdomain') redirect firstdomain.html else if (domain == 'seconddomain') redirect seconddomain.html Thanks! Joe ...

Exclude Specific Mobile Device from Apache .htaccess

I'm trying to exclude the 'iPad' user agent from being redirected like other mobile devices. I know that the value of HTTP_USER_AGENT includes the word iPad, so I put a line in like below, but it unfortunately doesn't make a difference. Does anyone have any suggestions on how this might be done? Thanks! RewriteCond %{HTTP_ACCEPT} "te...

I have no "AllowOverride" directive in my apache2.conf

I have viewed my httpd.conf and apache2.conf and I have no AllowOverride directive in either of the files. The .htaccess works fine. I have a bunch of rewrites in it, so I know it works. Is apache2 by default set to "AllowOverride All"? Anybody know if I should add this? Or if it would hurt to add it? The reason for all this is that ...

Mod rewrite problem

Hello.. At the root of my site... www.domain.com . want to add some static pages that the page url can be set from the user. So if the users set as url profile then full page url should be www.domain.com/profile .. So far a simple rewrite rule would do the job. trasnlate it to something like /staticpage.php?tag=profile The problem...

XHR doesn't work because "Origin is not allowed by Access-Control-Allow-Origin".

I'm working on a API-Server with Rails 3 wich is pretty handy so far but I'm running across a error all the time and I'm not sure wether it is because of my Apache Setup or the Rails App. When I try to do a HTTP DELETE or PUT request on http://sample.domain/uri/id via XHR, curl or HTTP-Client.app Rails or Apache responds with 404 or 403...

Django Double Slash in URLS Issue (Multiple Webservers, Apache and Nginx)

To see an example: load up a example.com, click on a link that's linking to /test and instead of going to http:// example.com/test/ it goes to http:// www.example.net//test/ Or if you login, the login form for the auto-generated django admin section posts to //admin instead of admin. Seems like this is a django issue, but the only thin...

PHP Can't find save handler memcache

I'm busting my brains over this issue (it should be straightforward), but can't seem to find a solution so hopefully one of you can help me. I'm trying to store sessions using php's memcache extension. I'm running MAMP and have installed the extension correctly (I think...it shows up when I do phpinfo), am running the daemon and can c...

How can the leecher do this?

The original website: http://www.vnedoc.com The leecher's website: http://www.vipa1.com As you can see they are completely the same except for the author (sangsang -> trangxinh) and the logo (v.v.v). How could the leacher do this? How can I prevent this? ...

why is mod_rewrite facility working?

I am trying to do simple rewriting url with using mod_rewrite facility of Apache. As they said i firstly remove the # from the LoadModule rewrite_module modules/mod_rewrite.so from conf. file. then i restart my apache. now what i want is something like this... on my index page there is one menu in which their is one link of "aboutu...

RewriteRules repeating part of the match

What I'm trying to achieve is trying to match both the subdomain and the full path in order to redirect to a version without www. in front of it. To do so I use: RewriteCond %{HTTP_HOST} ^www\.(.+).mydomain.com$ [NC] RewriteRule ^(.*)$ %{HTTP_HOST}%{REQUEST_URI} [C] RewriteRule ^www\.(.+)\.mydomain\.com/(.*)$ http://$1.mydomain.com/$2 ...

Apache request handling in MPMs

When a connection to port 80 is established, I read that these client requests are handled by child servers(in case of prefork MPM) or server thread(in worker MPM) but not by master server(the apache process that is started first by the root user and which is responsible for forking new child). But how, these child servers and server thr...

Apache redirect question to change domain name

I am attempting to add a rewrite rule to my apache configuration file to redirect users to a new url. The url of my site is https://openmind.scribesoftware.com. If a user enters a URL with https://openmind.scribesoft.com (note the lack of "ware") I'd like to redirect them as though they had typed the proper url. I have tried a couple v...

404 Not Found Error when trying to access localhost on local LAMP server

I'm running Ubuntu. My Apache2 default file looks like this: <VirtualHost *:80> ServerAdmin webmaster@localhost DocumentRoot /var/www/ <Directory /> Options FollowSymLinks AllowOverride None </Directory> <Directory /var/www/> Options Indexes FollowS...