apache2

how to change mime types in MAMP

I'm developing a website that has a HTML5 video. It looks like when ogg files are served with other mime types than video/ogg firefox flips. I've updated the mime.types file inside the mamp/apache/config folder and have restarted the MAMP server multiple times, but ogg files are still served with plain/text context-type. Can someone po...

How can I check apache modules version?

How do I get versions of apache modules on debian? I can get loaded modules list by apache2ctl -M - but how do I get their version numbers? ...

Direct root domain to a context and subdomain to another context

I have situation where i want to direct my root domain i.e. www.abc.com to a context in tomcat and *.abc.com to another context in tomcat. currently www.abc.com abc.com and *.abc.com all point to my ROOTcontext in tomcat but I want www.abc.com and abc.com to point to ROOT and *.abc.com to some other context in tomcat. ...

Mapping domains in a forward proxy

I'm currently running apache on my local machine as a forward proxy server. The config is pretty simple: ProxyRequests On ProxyVia On <Proxy *> Order deny,allow Allow from all </Proxy> However, if a user uses my proxy, I'd like to be able to map certain domains (without touching my hosts file or DNS) to certain directories o...

Apache 2.2 (Prefork) + APC issue

I have a dedicated server running FreeBSD 7.2 64bit. When I enable APC on Apache (Prefork), I notice in 'top' and in the SIZE column, it grows from 110MB to 384MB. I realize this is shared memory and shared across all apache processes. The problem I have is this : Each process size (in the 'RES" column) grows from 25mb to almost 100mb...

Displaying custom error page in PHP for errors which can't be caught by set_error_handler

I would like to be able to discard a partially rendered page and show an error page in PHP. I already know about set_error_handler(), but it can only trap certain types of errors. I would like to know how to show an error page when an error type which can't be trapped by set_error_handler() is raised. Unfortunately, it seems that the f...

is_file or file_exists not working in apache but in CLI

Hi, I have a very strange behavior with is_file() or file_exists() function. <?php $nfsFile = '/mnt/nfsdir/file.txt'; var_dump(is_file($nfsFile)); ?> this code returns FALSE all the time, but: $#php -r 'var_dump(is_file('/mnt/nfsdir/file.txt'));' returns TRUE, which is correct. I'm running Debian Squeeze, Apache 2.2.15...

can apache be configured to create separate sets of processes listening on different IPs for security?

I am trying to check if the following is possible. I have a single apache config file that listens on port 80 for external traffic and port 8080 for internal traffic. Can I configure in such a way that there are (say) 10 httpd processes that are handling my external traffic on port 80 and another set of (say) 10 httpd processes that are...

htaccess, a shortened url should not match a file

Hi! I have a little problem with my apache2 and .htaccess rules. for example: I have a shortened uri like www.domain.tld/sitemap which has to be rewritten by a rewriterule, redirected in a php File to display the sitemap. The problem is, that in the root folder a file named sitemap.xml exists. My apache automatically calls the sit...

Visual Studio 2008 ASP.NET MVC 1 (3.5 framework) Application to Mono 2.4.4 on Apache 2.2.14-5 on Ubuntu 10.04 Deployment

This is my scenario: Development Environment: Visual Studio 2008, Windows 7 Deployment Environment:; Ubuntu 10.04, Apache 2.2.14-5, Mono-runtime 2.4.4.(mono-server2 for ASP.Net 2.0 applications) I have all the dependencies installed. I'm simply trying to create an ASP.Net MVC 1 web application in Visual Studio and deploy it to Apache wi...

displaying html page through apache.

hi all , i am using ubuntu and i have a html page named first.html at home/sanu directory and i have apache2 installed and running.i want host this page through apache from my pc how can i do that. (My pc's IP is :218.248.80.51) .i have tried to access "http://218.248.80.51/sanu/first.html" but its not working(Google Chrome could not con...

conditional statement for redirecting IPs using .htaccess?

Hey guys, I am hosting my own server and have two ip addresses for it (one for people connecting from within intranet and one for people connecting from outside) and I have two dynamic dns's redirecting to these ip's. I have just installed/setup SSL on my apache2-based server, and am trying to use .htaccess to force users to use https. I...

Help with SSL Vulnerability (Mixed Content)?

Hey guys I have my own webserver that is hosting a website that I recently installed/setup a self-signed SSL cert. Securing the website seemed to go fine, but in firefox and IE I sometimes get pop up boxes that say something along the lines of "There is a mix of secure and insecure information on this page..." and in the firefox error co...

Node.js run script

Hi all, I have Apache httpd server and node.js. I need to emulate real JSON data which changes every time. I found, that I can run node.js as server in standalone mode like this: var http = require('http'); http.createServer(function (req, res) { res.writeHead(200, {'Content-Type': 'text/plain'}); res.end('Hello World\n'); }).list...

What does this set of django errors mean?

My Apache2 log is spitting out these errors on my Ubuntu 10.04 server. When I hit the server I get Internal 500 Errors and the log has this: [Mon Jul 19 07:40:11 2010] [error] [client 192.168.1.152] File "/usr/local/lib/python2.6/dist-packages/django/utils/dateformat.py", line 281, in format [Mon Jul 19 07:40:11 2010] [error] [client ...

Weird subprocess issue with Django

Hello! I'm sorry if this is a duplicate question, but after searching through 3 pages for "django subprocess", I, for one, could not find the answer to my particular problem. I'm trying to run pdflatex on tex file, but for some reason in Django it doesn't produce anything. It works just fine in a regular python script, though. I've om...

always preserve URL when redirecting to subfolder

I want to redirect all requests to a certain path on my server (/app) to a subdirectory at /app/app_site. Following rewrite rules do the job for requests like 'http://localhost/app/somepage.htm': RewriteCond %{REQUEST_URI} !^/app/app_site.*$ RewriteCond %{REQUEST_URI} !^/app_site.*$ RewriteRule ^/app(.*) /app/app_site$1 [L,PT] Thi...

mod_sec trigger on CSR rule _23

Hi, I'm using mod_security with the latest core rules. It triggers on all my pages whenever I use a querystring.. ie. www.mypage.com/index.php?querystring=1 I get a warning that it exceeds maximum allowed number of arguements, however the base config defines max_numb_args to = 255 which of course it doesn't exceed. Any ideas why? Ba...

PHP 5.3.2, Where do I find php5apache2_2.dll?

I'm upgrading my local version of PHP to 5.3.2, on Windows. I'm running Apache 2.2 right now. I've downloaded the zipped VC6 version of PHP from here: http://windows.php.net/download/ To my dismay, there's no php5apache2_2.dll file anywhere in the ZIP, and unfortunately Google is no help. I don't understand how anybody manages to get...

Why is Django template feature breaking my page rendering?

To explain, I've taken a bare bones view from the tutorial of Django, and pointed it at an html page that I know works. When I do the following call: return render_to_response('index.html', {'stuff': 'blah'}) The resulting page is terribly broken in the sense that a lot of the styles are totally lost. However when I view the page sour...