apache

need to remove www from 2nd level subdomain generically in Apache (using rewrite)

I have the problem but with many subdomains: E.g.. sub1.domain.com and new.domain.com and xsub.domain.com and many many more like this. How do I remove the www from in front of any of these with one generic rule. E.g. if someone types www..domain.com or http://www..domain.com to change it to http://.domain.com Thanks ...

PHP/Zend, MVC Web Application and Apache Rewrite problem [RESOLVED]

I'm in the process of building an MVC web application using the Zend framework and I've encountered an odd problem. If I have the httpd.conf VirtualHost section and the web site's root .htaccess file configured one way, Apache does not read the index.php file (i.e. www[dot]mywebsite[dot]com/ fails), writes nothing to the rewrite log and...

Error writing content through Apache.

I am streaming out data (sometimes png, sometimes json, sometimes xml) and I get the following error in Chrome: Error 321 (net::ERR_INVALID_CHUNKED_ENCODING): Unknown error. I do not get this error when apache is not in front of my Tomcat web application (servlet), only when I deploy it to our test environment which has apache running....

How do I stop the phusion passenger spawn server from restarting?

I have Phusion Passenger running my Ruby on Rails application on my local machine, but I'd like to be able to kill the process entirely and run a different (non-Apache) service on the same port. Unfortunately, when I kill the passenger spawn server and the httpd processes, the spawn-server restarts: 15:30:37 /usr/bin $ ps ax | grep pas...

Can a Rails app launch a rack app?

If I have a Ruby on Rails application running on my Apache shared server (with Mongrel), can I get it to launch/run another total separate Rack application? Then could I possibly build a Rails app that manages other rails/rack apps? So it could tell what apps are running and start/stop them when I want. Or is each app trapped in it's ow...

apache & php 500 error nightmares

I was trying to add curl support to php on a VPS, and after logging in and trying to perform a php upgrade, my site gives me a 500 error every time I try to access it. So, I tried refreshing apache install with easyApache, and it went swimmingly outside of the fact that php scripts still didn't work. I decided there must be something g...

Apaches mod_rewrite VS. PHP routing?

Hi, for some days now I have been trying to make a simple mod_rewrite rule to create friendly URLs, my web host have mod_rewrite enabled but I just can't get it to work. All the next questions where posted by me: .htacces to create friendly URLs Friendly URLs with .htaccess .htacces NOT working… None of the answers worked, so I'm t...

Timeout with Ajaxterm

Hi Everyone, I have a similar question to this: http://stackoverflow.com/questions/1287064/php-session-timeout-callback Basically, I want to run some code once a user has been inactive for a certain amount of time. However my case is a little more tricky than the above question. This is because I am using Ajaxterm: http://antony.lesuis...

How to make PHP set HTTP status code to 500 automatically in case of any error condition? (including those that cannot be handled by user)

Hi all. I am running Apache 2.2.15 with PHP 5.3.2, 'display_errors' disabled, 'display_startup_errors' disabled, 'log_errors' enabled. At my setup (so I consider it a norm), PHP aborts on fatal errors, which is good, and sets HTTP status code to 500. Fatal errors include E_ERROR, E_PARSE, E_CORE_ERROR, E_COMPILE_ERROR, E_USER_ERROR and...

PHP emitting 500 on errors - where is this documented?

In this question the OP mentions PHP throwing a 500 error automatically when error_reporting is off, and XDebug changing that behaviour. That got me curious, as I've never heard of PHP automatically emitting 500s before. According to various quotes and answers on SO and elsewhere, it seems to indeed be PHP's default behaviour to throw a...

Issues in using 3rd party libraries while developing Apache Modules

Hello everyone! I am writing an Apache module for my internship. I am using C for this (I am not acquainted with Perl or Python that much). I need to use an HTML Parser to solve the problem for which I am writing this module. I am considering libxml2 for this purpose. I am confused how should I link the library in my module ? Should...

nginx better than apache for dynamic content?

Hi, i have searched for this around the web and i can't find the right answer for my question. basically i want to know if i can get better performance with nginx than with apache (in php apps), and i'm not involving static content (where i know nginx is better). the sites are a widely collection of scripts with a lot of variables, us...

can apache handle non-http messages

I have a apache webserver, and we need to develop a module in it (using mod_python or mod_wsgi). It will ofcourse handle the requests sent as http GET/POST. However, we would like this module to ALSO handle messages sent by another remote applications which are NOT http based. That is, the body of the those tcp packets may just be a j...

What WAMP server is the best?

What WAMP server is the best? ...

Error in creating HTML form using Python-CGI

I have to create a HTML form and get the data using python-cgi. HTML form requires user to submit firstname and lastname and then the python script is supposed to get the data generated in the form. I have read up tutorials and tried playing with it to make it work, but it does not seem to happen. HTML code: <form method = "POST" actio...

need MySQL optimization help

I have done some testing to Mysql server and I got some results 1) it says maximum table cahce size is 64 and you have 84 open table. so Increase table cache size. My question is why this much table is opened?? is it a failure in closing tables?? or it is like that?? ...

WevDav example project in Apache Wink throws unsupported encoding exception

I am trying to compile and run WebDav example project supplied as part of examples of Apache Wink project. I have successfully deployed the project into JBoss and can reach it throw http. However, when i try to use Total Commander with WebDav plug in, i get the following exception: 15:13:41,595 ERROR [[restSdkService]] Servlet.service()...

Undefined symbol error on loading a module in Apache that uses libxml2

Hello everyone! I am writing an Apache 2.2 module that uses the libxml2 API. I have compiled the module using following commands: apxs -I /usr/include/libxml2/ -c mod_xmltest.c sudo apxs -n xmltest_module -i mod_xmltest.la and used the following LoadFile directive in httpd.conf LoadFile /usr/lib/libxml2.so However on starting the...

Sub domains on the fly or Wild Card subdomains

Hey there Stack OVerflow Is it possible to redirect everything in a subdomain to the main domain. Eg anything.example.com something.anything.example.com must all go to example.com and anything.example.com/page.php something.anything.example.com/page.php must all go to example.com/page.php is this possible ? on a shared host ? ...

Paths for images using Apache with Windows

I have a problem with links testing locally using Apache with Windows. The final links have the following format: file:///C:/Documents and Settings/USUARIO/My Documents/xampp/htdocs/my_website/images/january/my_image.jpg The images do not show. However, if I directly copy the src from the img tag and paste it into the browser (Firefox)...