apache

imagegrabwindow + https = black screen

I'm doing something stupid and trying to capture thumbnails, snapshots, images of a html webpages. I'm doing something along the lines of: http://stackoverflow.com/questions/443837/how-might-i-obtain-a-snapshot-or-thumbnail-of-a-web-page-using-php DCOM + IE + PHP (imagegrabwindow; example from manual) Everything works PERFECT until I...

Automatically Host User Domains in Rails/Apache

Hi, I'm currently developing a user facing web application that gives each new user their own subdomain on the site, which is fine (using subdomain_fu), but is there a way to let a user map their own domain to this subdomain? I know how to do this manually through SSH-ing into the server and editing the Apache Vhosts file by hand, but i...

which version of apache to install on a windows 64 bit OS?

I got a new machine whose OS is windows XP professional x64 edition. Which version of Apache should I install? There doesn't seem to be a build for win 64, I can just see a build for win 32, will it work with win 64? ...

Multiple Ruby versions on one webserver?

The Ideal Using rvm, it would be awesome to be able to have multiple Rubies on one webserver, and through some sort of server configuration, be able to assign Ruby versions to different Rails/Sinatra/etc apps on a per-project basis. I am aware, from rvm's documentation, that Passenger only works with one Ruby at a time. :( The Comprom...

DeprecationWarning when pushing to Mercurial repo

I'm trying to serve a merurial repository with apache, and when I try to push to the repo I see this in the apache error.log. On the client side I get a 500 error. How do I get this to go away???? [Sun Jun 06 14:43:25 2010] [error] [client 192.168.1.8] /var/lib/python-support/python2.6/mercurial/hgweb/common.py:24: DeprecationWarning:...

Can host be extracted from referer in mod_rewrite for htaccess / apache?

I'm trying to do a rewrite where I need the host part of the HTTP_REFERER. So if the referer is e.g. http://www.example.com/some/path I need to extract the host part, www.example.com and use it in the RewriteRule, so that it rewrites to /some/serverpath/www.example.com/subfolder. Is this possible? ...

Rewriting ASP.NET (.aspx) pages in Apache

I managed to get ASP.NET to work in Apache, as per http://weblogs.asp.net/israelio/archive/2005/09/11/424852.aspx but I'm unsure how to get it to rewrite pages, with a web.config file. I've tried using Google endlessly, but came to nothing. What's the best solution for me to rename my pages, e.g. mytestpage.aspx to mytestpage.htm Als...

X-Forwarded-For causing Undefined index in PHP

Hi, I am trying to integrate some third party tracking code into one of my sites, however it is throwing up some errors, and their support isn't being much use, so i want to try and fix their code myself. Most I have fixed, however this function is giving me problems: private function getXForwardedFor() { $s =& $this; $xff_ips = array(...

Where am I going wrong? "undefined method 'application' for Sinatra:Module" Sinatra/Passenger/Apache

Hi, I'm trying to get my first Sinatra app off the ground, but am getting an error page from Passenger: undefined method `application' for Sinatra:Module Here's my Rackup file: require 'rubygems' require 'sinatra' set :env, :production disable :run require 'app' run Sinatra.application And the app itself: #!/usr/bin/env ruby re...

"Connection: Keep-Alive" in server response

Hi, I'm trying to establish a HTTP persistent connection from a Silverlight application to a PHP page (ie without creating a new TCP connection for each HTTP request) hosted by an Apache server. To this end, I need the webserver to send its HTTP responses with the "Connection" header set to "Keep-alive". Client-side, there doesn't seem...

Little mod_rewrite problem

I have a classifieds website. Each classified is linked like this originally: mydomain.com/ad.php?ad_id=Bmw_M3_M_tech_113620829 What RewriteRule should I use to make this link look like: mydomain.com/Bmw_M3_M_tech_113620829 Also, what do I need to add to my .htaccess file? This is what I have so far: Options +FollowSymLinks ...

Very simple mod_rewrite questions

1- Does mod_rewrite means that if I make this url: domain.com/ad.php?id=8498292 INTO domain.com/8498292 that all links on my website will have to be changed to the later above? example the link: domain.com/ad.php?id=8498292 wont work now, unless I replace it with domain.com/8498292 ? Or will the server know that they are the s...

Placing .htaccess file in var/www folder messes my website up...

I am playing with mod_rewrite now, and have successfully enabled it. However, I need to put a htaccess file inside var/www/ in order to achieve what I want, which is to rename Urls simply... When I place it my website becomes very strange and nothing basically works... Is there any code I need to put into the htaccess file in order for...

ProxyPass or intercept web requests .NET

I have got a .NET winform application that uses a Web Mapping Service that is password protected. Unfortunately I cannot attach a username and password to requests, ( the request are generated from a GIS mapcontrol) I can think of two ways around it Intercept all web requests from my .NET app and add a username/password Set up an Apa...

Host Primary Domain from a subfolder

I am having a problem making a sub directory act as the public_html for my main domain, and getting a solution that works with that domains sub directories too. Background My hosting allows me to host multiple sites, which are all working great. I have set up a subfolder under my ~/public_html/ directory called /domains/, where I creat...

Is it possible to launch a php script at apache startup

Hi, As the title says, I want to know if it is be possible to automatically launch a PHP script when a restart of apache is done. thanks MORE INFO EDIT: I will try to explain what is the purpose of this, the best I can. We are currently refactoring our application and we'll be stuck with 2 differents configuration file system for th...

Moving Wordpress from Apache to IIS

I've encountered a problem when moving a Wordpress installation from a Linux Apache server to a Windows IIS server. Nearly all pages load blank, including /wp-admin/. I created a php file in the main directory to check phpinfo, and it loads fine. I've copied the file system over, as well as the database. I've also updated the wp-config....

How do I redirect example.com to example.com/subdirectory?

Hey, I’m trying to redirect example.com (and example.com/, www.example.com and www.example.com/) to example.com/subdirectory. I could do this easily using HTML but from what I read, it’s better to make a 301 redirect using Apache. However, I’m having a hard time finding documentation on how to do this. ...

How to balance load in a Apache + Mongrel application

I was wondering if someone can explain how can a rails application be balanced. Two questions: Does it even help having separate rails applications reading from the same database in the same dedicated server? I understand Apache can balance load installing some extra modules? am i right? how can we accomplish this? (please provide exp...

SSI or PHP Include()?

Hi all, basically i am launching a site soon and i predict ALOT of traffic. For scenarios sake, lets say i will have 1m uniques a day. The data will be static but i need to have includes aswell I will only include a html page inside another html page, nothing dynamic (i have my reasons that i wont disclose to keep this simple) My quest...