apache

Which web server I need to install and how?

I would like to install a web server on my Window 7. I found instructions for installation of Apache on Windows 7. But as far as I understood I need to have the administrator permission to do so. Am I right? I also though that it is probably a good idea to install another web server (like a native one) on my Windows 7. I thought it shou...

Can I run two web servers on the same computer?

I just found out that I can write a really simple web server using Python. I have already an Apache web server I would like to try the Python based web server on this machine. But I am afraid that I can get some kind of conflict if I try it. I mean how two web server will "decide" who needs to server a request from a client? ...

Is it possoble to obtain the hostname only from HTTP_REFERER with mod_rewrite?

I'm trying to parse hostname only from the Apache server variable HTTP_REFERER and I'm wondering if it's possible with mod_rewrite since my goal is to obtain the hostname and then rewrite the request. ...

Is there a way to return 404 Not Found for prohibited directory listings in Apache?

My web server is Apache. I have disabled directory listings via an Options -Indexes directive in a .htaccess file, so if a user navigates to a directory without an index.html file, he'll get a 403 Forbidden error. However, I'd like to return 404 Not Found in such instances instead. Is that possible? ...

mod_rewrite, I want to detect if a file exists in another directory and retrieve that

I want to point to a sub directory file if it exists. Currently I have in an .htaccess file at the webroot: RewriteCond my_sub_dir/%{REQUEST_FILENAME} -d RewriteRule ^.*$ my_sub_dir/%{REQUEST_FILENAME} [L] Basically I want http://example.com/js/application.js to point to my_sub_dir/js/application.js if it exists ...

How to write .htaccess if django project is in subfolder and subdomain?

The path to my django site is: staging.ninjawebsite.com/clients/project/ I want that to be treated as the base url. The django project is in the public_html/clients/project subfolder. Everything seems to be working fine but all links to say /city/ should go to staging.ninjawebsite.com/clients/project/city/ but it goes to staging.ninjaweb...

ZendFrameworks not working nice with RewriteRule

I have the following RewriteRule on my Apache with ZendFramework in the back: RewriteRule ^/account([0-9]+) /account?i=$1 [L] Problem that I'm having is that I have an AccountController.php for ZendFramework, so URL from browser going to ...://myserver/account works just fine. However, when I have this rewriterule in httpd.conf, and p...

How to configure nginx for JBoss?

How would I configure nginx to handle static content and delegate or pass dynamic content to JBoss? Thank you. ...

ROOT CAUSE: java.lang.OutOfMemoryError: Java heap space [Using Apache for Coldfusion 7 on localhost]

I am getting following error message all of the sudden. 5 minuted before everything was working fine. 500 ROOT CAUSE: java.lang.OutOfMemoryError: Java heap space javax.servlet.ServletException: ROOT CAUSE: java.lang.OutOfMemoryError: Java heap space at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServle...

supervise apache with daemontools

I am trying to setup daemontools for two apaches in one server. one apache 2.2 listening on port 80 proxy request to a second apache 1.3 listening on port 8888. ./run script as following: #!/bin/sh # apache 1.3 exec /apache_1_3/apache/bin/httpd -F #!/bin/sh # apache 2.2 exec /apache_2_2/apache/bin/httpd -D FOREGROUND daemontools mon...

Deplying Django with WSGI: App Import Error

Hi I am new in apache, linux and python world. I am trying to deploy django application on apache using WSGI (the recommended way). My django project directory structure is as follows... / /apache/django.wsgi /apps/ #I put all my apps in this directory /apps/providers/ /apps/shopping/ /apps/... /middleware/ ... In apache I have fo...

Problem compiling mod_wsgi on Solaris 10 with Cool Stack 1.3.1

I try to compile mod_wsgi with Cool Stack 1.3.1 on the Solaris platform: export PATH=/usr/sbin:/usr/bin:/usr/local/bin:/usr/sfw/bin:/usr/ccs/bin FLAGS="-I/opt/coolstack/include" LIBS="-lintl -lgettextlib" \ LD_LIBRARY_PATH=/opt/coolstack/lib LDFLAGS="-L/opt/coolstack/lib -R/opt/coolstack/lib" \ ./configure --prefix=/usr/local/mod_wsgi ...

Why is gzip compression not working?

This is an odd one. I am slowly rebuilding a website on a live server. Some sections of the site have been rebuilt and therefore the code is placed in a subdirectory of the home dir (ie:/mysite/newcode). I had successfully gzipped the old site using ob_start("ob_gzhandler"); So, i have applied the exact same code for the new code. Howe...

Multithreading in PHP

Hi all, I am trying to create a multi threaded PHP application right now. I have read lots of paper that explains how to create multi threading. All of those examples are built on diving the processes on different worker PHP files. Actualy that is also what I am trying to do but there is a problem :) There are too many jobs even to ...

local copy of this webpage is out of date

My Web pages causes following error on the browser's Back Button, It works fine for firefox but not on IE, IE Says, Most likely cause: •The local copy of this webpage is out of date, and the website requires that you download it again. What you can try: Click on the Refresh button on the toolbar to reload the page. After refres...

How to set REMOTE_ADDR in apache before php is invoked

I have a website set up with nginx acting as a reverse proxy to apache 2.2, which is running php. From apache and php's perspective the IP address of all requests is the nginx server. I'd like php to see the same remote IP that nginx sees. Nginx sets a header X-Real-IP which contains the remote IP that nginx sees. I tried doing somet...

How do i access my own MAMP webserver on a VM

Hey guys, I have MAMP running on localhost on my MAC, now i would like to view this on my Windows XP VM (VMWare Fusion). I have set my MAC up to have 'Web Sharing', but this only allows you to view files in the 'Sites' directory in your user home, but, my MAMP web folder is on my desktop. Any suggestions about how i can somehow view th...

cakephp & httpd.conf issues on windows based apache server (wamp)

So, i was wondering if some one could clarify following occurrence and maybe suggest how I could tackle this. sorry for the weird coloring of the code Let me explain the set up first. I have wamp server installed and it is located physically on one hd and then my development files are located on separate hd. So i have added alias to ac...

PHP: Allowing Public and private access to files?

I am building a site that is permissions based. The user can add or remove read permissions to the public for pages as well as files. What is the best way to serve files that are protected, using php? I have seen things like www.mysite.com/download?file=filename.jpg or something like that, but I prefer clean paths. Also, if my files ...

What should Apache serve and what should Tomcat serve?

I'm trying to set up Apache in front of Tomcat. What do I have Apache serve? I know Apache works better for static pages and images. I currently deploy a war file in Tomcat that contains static pages, images, and Flash files. Should I put those all on the Apache server? How to I reference those pages/images from the Tomcat applicati...