apache2

Apache/Django freezing after a few requests.

I'm running Django through mod_wsgi and Apache (2.2.8) on Ubuntu 8.04. I've been running Django on this setup for about 6 months without any problems. Yesterday, I moved my database (postgres 8.3) to its own server, and my Django site started refusing to load (the browser spinner would just keep spinning). It works for about 10 mintue...

How to add Expires to Flash and Icon components

Yslow is currently giving Grade B for my site and also for "Add Expires Headers". It says: There is 1 static component without a far-future expiration date. * (no expires) http://localhost/images/favicon.ico The current Expires code in my apache.conf is like this: ExpiresActive On # enable expirations # expire after a wee...

Rewrite subdomain to subdomain/folder in vhost situation

I'm trying to rewrite abc.example.com/path to abc.example.com/index.php/abc/path using the following .htaccess: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(abc)\.example\.com RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php/abc/$1 [L] The situation is: domain www.e...

Apache2 is changing my content type for a Ruby cgi script

I have a ruby cgi script which writes it output like this: cgi.out("Cache-Control" => "no-cache, must-revalidate", "type" => "text/html", "charset" => "UTF-8") { template.result(binding) } Unfortunately, when I view the headers from cURL, I see the following: < HTTP/1.1 200 OK < Date: Sun, 23 Aug 2009 09:48...

.htaccess for cakephp

I'm trying to get a CakePHP application to work. For this, I've set up a brand new Debian installation, updated the configuration and put everything in /var/www, which has the following content: app cake .htaccess index.php vendors The .htaccess file contains the following: <IfModule mod_rewrite.c> RewriteEngine on RewriteRul...

How to use mod_rewrite to map to a different domain and preserve the original

For example: www.example.com and subdomain.mydomain.com are on the same server. When I put example.com in the address bar, I want it to serve the pages from subdomain.mydomain.com, but still show as example.com in the browser. So, if the old URL was: subdomain.mydomain.com/this/stuff?is_cool=yes the new url would be www.example.co...

Share Python Interpreter in Apache Prefork / WSGI

I am attempting to run a Python application within Apache (prefork) with WSGI in such a way that a single Python interpreter will be used. This is necessary since the application uses thread synchronization to prevent race conditions from occurring. Since Apache prefork spawns multiple processes, the code winds up not being shared betwee...

linux - Problems installing SSL cert - Apache2

HI there, So I followed this tutorial: http://www.tc.umn.edu/~brams006/selfsign%5Fubuntu.html step by step in installing a Thawte cert... however on attempting to restart apache I get the following: Restarting web server apache2 [Mon Aug 31 14:20:23 2009] [warn] NameVirtualHost *:443 has no VirtualHosts httpd (pid 10117?) not running...

How do i determine if OpenSSL and mod_ssl are installed on apache2

Hi there.. does anyone know the command to determine if OpenSSL and mod_ssl are installed on apache2? Regards, Fiona ...

IE closes connection on file download before end of download

IE randomly closes the connection whenever we try to download a file from our server (mp3 file). It sometimes downloads the whole file, but it sometimes just doesn't download at all. I've added %X to the apache logs, and whenever the download fails, instead of "+" I get an "x" in the log. Does anyone have any idea why this would happe...

.htaccess multi domain using

Hello all, I have problem. I want to load defined folders into my website from same system, now I need to know how I can get a folder from a domain if I type "domain.dk" its load "theme/domain.dk/javascript/ and if I type "domain.com" its load "theme/domain.com/javascript/" folder to use. RewriteRule ^Javascript?$ /theme/{HTTP_HOST...

apache2 force proxy for specific url on a subdomain

Hi, I have a site that has dynamic virtual subdomains using mod_rewrite, as defined like this: <VirtualHost *:80> ServerName example.com ServerAlias *.example.com DocumentRoot /var/www/example.com/www RewriteEngine on RewriteCond %{HTTP_HOST} ^[^.]+\.examle.com$ RewriteRule ^(.+) ...

What tech needed to run JSP and Servlets?

If I want to build a site with PHP, all I have to do is install the PHP package and make sure mod_php is enabled in my apache web server. Voila! a PHP environment. Now, if I want to build a site with equivalent Java tech, i.e. JSP and Servlets, What do I have to install? ...

Why Apache doesn't gzip css or js files which have parameters ?

Hi all, Some CSS & JS files are not compressed by apache with mod_deflate enabled. This files looks like this "[domain.name]/aggregator.css?..." or "[domain.name]/misc/jquery.js?..." in YSlow. The other CSS & JS without the "?" gets compressed. Kindly explain me how do I make apache compress this files also. Thanks ...

Using Connection Based State with Apache2

I am writing an HTTPS based application using Apache2 as the web server, and python as the language (not sure which framework or Apache2 mod yet). After clients (which are not web browsers) first establish an HTTPS connection to the server, they are expected to send an authentication message. If authentication is successful, they are abl...

Tornado is "a relatively simple, non-blocking web server framework written in Python"--can somewhat explain what that means?

This is probably a stupid question, but what exactly is a "non-blocking web server"? All web servers are technically non-blocking, arent they? otherwise how could they handle simultaneous connections? Apache2 achieves this using a combination of fork() and pthreads. How exactly are Tornado (and Twisted also) different? Do they just set a...

test.php cannot output file into Leopard filesystem

may i know what permission do i need to add, to allow test.php to able to write file into macos filesystem PHP Error: <br /> <b>Warning</b>: file_put_contents(20090915203127.jpg) [<a href='function.file-put-contents'>function.file-put-contents</a>]: failed to open stream: Permission denied in <b>/Library/WebServer/Documents/testphp/tes...

Nested URLs and Rewrite rules in Apache2

Hi, I need some help with rewrite rules and nested URLs. I am using TikiWiki for my website and am in the process of setting up SE friendly URLs for my projects. Specifically, I have the following rewrite rule for www.example.com/projects to point to a page that lists out all the projects hosted in example. RewriteRule ^Projects$ ar...

How do you make a site private?

I'm just fooling around, learning the ins and outs of web development and I'd like to make my domain private until I'm ready to display it. What's the best way to do this? BTW, I have an Apache server on Debian. ...

Apache 2.2 localhost VirtualHosts problems

Hi all, I am trying to setup my dev machine with virtual hosts so I can access my development projects with a simple url, like http:// project.dev/ rather that a whole http:// 127.0.0.1/dev/path/to/root/of/project/ type of url. Now, I'm aware there are many tutorials and questions already answered about this, but after trying many of th...