apache

Apache: force ssl redirect works for all cases but one??

we are registered under verisign for mydomain.com, but not www.mydomain.com, so all of my ssl redirects must also remove the www. (if any). so the redirect must go to https://mydomain.com it currently redirects to that with: mydomain.com www.mydomain.com http://mydomain.com http://www.mydomain.com but does not work for: https://www....

How to write mod_security friendly PHP code?

Hello people, I made a theme in WordPress which hit the mod_security rule on HostGator and gave 403 error. I contacted people there(at HostGator) and they fixed it for me. But I don't want my theme to work like this. I just wanted to know if there are any guides/blog post/tutorials telling about writing PHP code which is mod_security ...

Python module being reloaded for each request with django and mod_wsgi

I have a variable in init of a module which get loaded from the database and takes about 15 seconds. For django development server everything is working fine but looks like with apache2 and mod_wsgi the module is loaded with every request (taking 15 seconds). Any idea about this behavior? Update: I have enabled daemon mode in mod ws...

post commit hook fail

I have Master/Slave setup using Win2k8R with SVN 1.6.9 and using TortoiseSVN 1.6.7. The access is through Apache and using http. Everything works but when I commit I get the following message: Error: post-commit hook failed (exit code 1) with output: Error: The process cannot access the file because it is being used by another process. ...

Same-directory includes failing on a Fedora server with PHP.

I have a couple files that look like this: index.php: <?php include('includes/header.php'); ... includes/header.php: <?php include('config.php'); ... The error I get is Warning: require(config.php) [function.require]: failed to open stream: No such file or directory in [dir]/includes/header.php on line 2 Fatal error: re...

Problem deploying Rails with Passenger to Mac OS X Leopard Server

I'm spinning my wheels... Apache is working and serving static html, png, etc. normally. Trying to get Passenger to serve a rails app out of www.mydomain.com/rails/ as it stands when i try to hit my app: www.mydomain.com/rails/myapp/railsclassname I get only an Apache 403 Errors. Nothing in myapp's Production Log. Apache2 access.log: ...

getting error as Internal Server error

Hi There, When I try to run my site it gives error as Internal Server error, when I refresh the page I get my result properly.The error page looks like this: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster@te...

How do I redirect a user using Apache Rewrite, to the fully qualified domain name?

Hi Guys, I'm really new to apache mod_rewrite module. I have a page called http://abc in my company intranet. I want users to be redirected to http://abc.somecompanyname.com whenever they type http://abc to the URL bar. Could someone please provide and example or point me in the right direction. I figure this should be quite an ea...

Apache redirection problem!!!!

Hi guys, I am setting up a pre-built website built in php. The site was actually hosted on the linux server. Now I am trying to set it up on a Window machine with WAMP server. In this website almost every page request passes through a particular file called redirect(which is basically a php file without extension). Now the problem is th...

Setting up path mapping in PHP and Eclipse

I have just setup my website locally so I can test my pages more easily. Eclipse has been configured to use an XAMPP server locally. The problem is that I want to map my project to a certain place in my website. ie. In my Eclipse PHP project I have a folder called com I want this to map to /com in the webstie. I tried to do th...

do file uploads have to be store before virus scanned?

Quick question guys, I am trying to configure a virus scanner to scan file uploads by users and am just curious whether they must be stored on the server before being scanned or if you can scan before saving the file? I am running apache on linux with php. Any advice appreciated. ...

Is there anyone here familiar with this zend debugger error found in apache's error log?

[Zend Debugger] Cannot receive start command ... [Zend Debugger] Cannot send message I googled and found there are others also having this problem (here and this one on serverfault), but unluckily no fix yet. PHP 5.2.8 (cli) (built: Dec 8 2008 19:31:23) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008...

org.apache.commons.httpclient.HttpClient stuck on request

Hi All I have that code : while(!lastPage && currentPage < maxPageSize){ StringBuilder request = new StringBuilder("http://catalog.bizrate.com/services/catalog/v1/us/" + " some more ..."); currentPage++; HttpClient client = new HttpClient(new MultiThreadedHttpConnectionManager()); cli...

Apache mod_rewrite - forward domain root to subdirectory

I have what I originally assumed to be a simple problem. I am using shared hosting for my website (so I don't have access to the Apache configuration) and have only been given a single folder to store all my content in. This is all well and good but it means that all my subdomains must have their virtual document root's inside public_htm...

Apache and Rewrite Module

I created a file .htaccess in the /var/www directory. The rights are "root root --wxrwxrwxr". The content of the file is: Options +FollowSymlinks RewriteEngine on RewriteLogLevel 3 RewriteLog "/var/log/apache2/rewrite.log" RewriteRule ^(.*?)$ testphp.php When I call the page phpinfo.php, I've got: Loaded Modules ... mod_rewrite ... ...

Setting up httpd.conf / mod_rewrite to redirect to codeigniter?

I'm sorry to ask this here, as I'm sure the solution is fairly easy but for the life of my I can't setup httpd.conf on my localhost apache server to automatically load the codeigniter files. Instead I'm having to go into the folder itself localhost/trunk/etc/etc until I get index.php - which messes with some of the relative paths (our b...

Useful ways for multilanguage navigation and static content on your site?

Hi, I have a big site running under Apache and PHP and in few mounths I should consider to add some different language version of it, but I'm not sure about the right way (or ways). My problem it isn't the user data, because I can use db tables with different languages (en, de, it, etc.) so I want concentrate my answer on navigation and...

python global variable not working in apache

I am facing issue with the global variable, when i run in the django development server it works fine, but in apache it doesn't work here is the code below: red= "/project3/test/" def showAddRecipe(request): #global objc if "userid" in request.session: objc["ErrorMsgURL"]= "" try: urlList= request....

mod_rewrite: no ? and # in REQUEST_URI

Hello. What I'm trying to do: have pretty URLs in the format 'http://domain.tld/one/two/three', that get handled by a PHP script (index.php) by looking at the REQUEST_URI server variable. In my example, the REQUEST_URI would be '/one/two/three'. (Btw., is this a good idea in general?) I'm using Apache's mod_rewrite to achieve that. Her...

Reverse Proxy Autharization (Oracle Application Server)

I have an application deployed on a server. I then have a reverse proxy on another server (Oracle AS) to this application in order to make use of Oracle SSO which works fine. I now need to build in a layer of authorization for the application between the Oracle SSO and the application. The obvious would be to build it into the applicat...