apache

How to run multiple PHP sites using same APC cache?

Ok, the situation is I have multiple php sites all running on the same server using the same CMS. There is no change in the core code or modules for the CMS between sites so would like to have all sites use the same code repository to make it easier to keep all the sites running the same version. This part is easy enough to do using sym...

Route two domains to same JBoss instance

I have two public websites (foo.com and bar.com) that are pointed to a hardware load balancer. This hardware forwards the traffic to my server as follows: http://foo.com ==> port 7700 https://foo.com ==> port 7701 http://bar.com ==> port 7800 https://bar.com ==> port 7801 My server is currently an old iPlanet box that defines t...

Stripp all header in PHP response

How if at all can I strip all the header from a PHP response through apache in order to just stream the text response. I've tried adding a custom htaccess but to no avail. I've got limited control of the hosting server. The stream is read by an embedded device which doesn't need any headers. ...

Help with dynamic RewriteRule in .htaccess

Hi, I would like to use RewriteRules in .htaccess to achieve particular url rewriting, but can't get it right, can somoene help? I'm trying to rewrite the path (everything between the first and last /) into one query string, and the filename into another e.g: http://domain.com/users/admins/testuser.html rewrites to http://domain.com/...

Apache httpd 2.2.x + mod_jk 1.2.30 + tomcat 6 Error : Could not find worker with name 'XXXXX' in uri map post processing.

I am getting the following error while setting up the load balancer with two tomcat instances : Blockquote [info] mod_jk.c (3189): mod_jk/1.2.30 initialized [error] jk_uri_worker_map.c (506): Could not find worker with name 'loadmanager' in uri map post processing. Blockquote Follwoing are configuration settings: httpd.conf ch...

How to compile c++ using mingw from an apache cgi?

Hi ! I'm trying to execute mingw's g++ from inside a cgi written for apache. The line I execute is: c:\mingw\bin\g++.exe -Wall -IC:\hpxbase -O2 -c -v -o code.o code.cpp This works when I call exactly this line from a cmd window. But when run from my cgi, g++ crashes. I made the cgi open up ots own console window and there is the messa...

Ruby on Rails cannot find initializer?

I cross posted this to Serverfault, but I'm not sure if this is more development or server related, unfortunately. =( Hello, I am trying to deploy an app to a fresh Ubuntu 10 installation using Passenger 2.2.15, Rails 2.3.5, Ruby 1.8.7, and Apache 2.2.14. However, even with a default rails app (sudo rails defaultapp), I am receiving t...

Setting up virtual hosts for Rails apps on Apache and Mongrel

I have a single Linux server running 3 site on Apache. Let's call them RailsApp1, RailsApp2, and SimpleApp. Both Rails applications are using Mongrel clusters. The other application is just a single HTML file. I have different Virtual Host files setup in Apache for each site, as well as mongrel_cluster.yml files for both Rails sites (cod...

HTTP Streaming with Apache, Perl, and jQuery?

I'm trying to prepare a proof of concept for a page that will take a file that a user chooses, process it, and return it, all the while reporting on the status of the process. I thought the best solution for this may be HTTP streaming, however I can only get it working in Firefox (not Chrome or IE8.) load.js $(function() { var...

Do you need to be running under IIS to query Active Directory with PHP LDAP

Using PHP's LDAP support, I was curious if you need to be running under IIS in order to query the local Active Directory. Would you be able to query it if the server is running Apache instead? Also, could I query an Active Directory setup on another machine than the code is running on, or does it need to be done on that machine? ...

How to Shut Down CodeIgniter Application?

Assume I have a CI app that does the following: Allow users to log in and perform certain tasks Constantly have cron running scripts in the background Now, say I need to do some upgrades to the site. How do I do this safely? I don’t want to shut down the server while users are logged in or cron script still running. I could set a fl...

VirtualBox Ubuntu LAMP Stack development, with SVN and CruiseControl/phpUnderControl?

I've got a Windows 7 machine upon which I do both PHP/MySql Dev, and .NET/C#/Sql Server coding. Due to a recent re-install, I thought it might be an ideal time to try and keep my machine a bit cleaner rather than install both Apache and IIS, etc. I installed VirtualBox, with Ubuntu 10.04 as the guest OS, with the plan to move my PHP ...

Multiple production ruby/rails environments

I would like to know if it's possible to set specific ruby environments to specific sites. In /etc/httpd/conf/httpd.conf LoadModule passenger_module /home/user/.rvm/gems/ruby-1.8.7-p249/gems/passenger-2.2.15/ext/apache2/mod_passenger.so PassengerRoot /home/user/.rvm/gems/ruby-1.8.7-p249/gems/passenger-2.2.15 PassengerRuby /home/user/.r...

Django/Mod_WSGI 'client denied by server configuration'

I'm attempting to set up Apache 2.2, Django 1.1.2 and Gentoo. I wish to serve my project with the address: /comics I followed the mod_wsgi directions in the django documentation to the letter, coming up with these files: /etc/apache2/modules.d/70_mod_wsgi.conf <IfDefine WSGI> LoadModule wsgi_module modules/mod_wsgi.so </IfDefine> WS...

Apache + Action

Apache 2.2 has "Action * virtual" directive. Is it possible to do the same with Apache 2.0.63? ...

My Rails 3 site won't start on Ubuntu/Apache2/Passenger

This server runs on Ubuntu 10.04, particularly on Linode VPS. Passenger Error: A source file that the application requires, is missing. It is possible that you didn't upload your application files correctly. Please check whether all your application files are uploaded. A required library may not installed. Please install all libraries ...

Redirecting www to non www on server with wildcard subdomains

Hi, I have a Rails+Apache+Passenger setup and my app serves wildcard subdomains. I need all www URLs to redirect to their non www equivalents. www.example.net should redirect to example.net www.subdomain.example.net should redirect to subdomain.example.net My current vhost config is as below <VirtualHost *:80> ServerName exampl...

ErrorDocument doesn't seem to be working in my .htaccess

Can anyone advise please? I'd like to have the default page for visitors to my site as being index.php and for all non-existent pages the visitor should see errordoc.php So I've put this in the .htaccess: ErrorDocument 404 /errordoc.php Options +FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} !^mysite\.org\.uk$...

Ruby on Rails .htaccess issue

When I run newly created Rails application on Apache, I can only access it's default front page ( standard app/public/index.html) file. When I try to run custom method via URI I get page not found. So I'm guessing that something is wrong with my .htaccess. Do I have to "open" it for every controller? RewriteCond %{HTTP_HOST} ^example.c...

jquery JSON making an OPTIONS request despite GET being set.

Hello, I am having an odd problem on Windows whilst using any browser. When I make a request from my local machine to an external website with a JSON file. Apache receives an OPTIONS request rather than a GET despite GET being specified. After some research it looks like a cross site request issue however, most of the articles I found w...