apache

jetty via apache mod_proxy

Using an Apache virtualhost and mod_proxy I want to access a java application (myapp) available in a jetty instance on port 8080. With ProxyPass / localhost:8080/ on my apache virtualhost configuration I can access the application running in jetty with www.mydomain.com/myapp but I want the application to be accessed from www.mydomain.co...

What to do if I have a CGI that runs for several minutes before outputting data, and Apache times it out?

I have a CGI script that takes a really long time to execute. Long story short, it needs to process a lot of data, run a bunch of slow commands, and make some slow web queries, during which time it doesn't output anything, and when it's done, it finally prints its results out in JSON format. It takes several minutes to run, which is long...

Prevent images loading in html

I'm developing a mobile version of a website, unfortunately because of the archaic CMS in use it's not possible for me to alter or offer an alternative template for the pages - therefore I only have css and javascript (and maybe .htacess) at my disposal. I've looked around, and I think there may be a way to prevent images from loading u...

Apache 2 types SSl using VirtualHosts

I have 2 different applications. 1) tools.helpme.com Require Client Certificates from users! SSLCACertificateFile /usr/local/etc/apache22/certs/cacert.pem SSLCertificateKeyFile /usr/local/etc/apache22/certs/server.key SSLCertificateFile /usr/local/etc/apache22/certs/server.crt SSLCertificateChainFile /usr/local/etc/apache22/certs/serve...

How to get Apache 2.2 to load *.php?

I've looked around for hours trying to get this to work. I'm not new to programming in general but I've never done anything with servers and PHP. I can't get Firefox to open any *.php pages in my root directory (c:/wamp/www). It tells me Foo is a PHP script, and gives me 2 options: open it with ... or save file. To start I downloaded a...

mod_rewrite 301 Redirect: from old to new dynamic url

I am trying to get a mod_rewrite working correctly. Here is the code: RewriteCond %{QUERY_STRING} ^main_page=product_info&products_id=301$ RewriteRule ^index\.php$ /blog/shop/index.php?route=product/product&product_id=301? [R=301,L] It works, but in the end of the new URL %3f is added. Can somebody help me to get it work?...

Error configuring Django to run customized comments framework

I'm having an issue with setting up a Django website which uses the Django comments framework on my server. The site runs fine when run locally (using manage.py runserver) but when pushed live I'm getting the error: ImproperlyConfigured at / The COMMENTS_APP setting refers to a non-existing package. My server is an apache/mod_wsgi setu...

Need help setting up curl php extension.

I have been trying to set up curl with php 5 and apache 2.2 for at least a day now and I have been thrown in so many directions. None of these directions worked for me. I have uncommented the extension=php_curl.dll and set the extension_dir = "c:\php\ext" All of this was in the c:\php\php.ini I was then told that I am supposed to edit...

Php 5.3 upgrade at Debian lenny

How can I upgrade php to 5.3 version at Debian lenny from squeeze packages? Will Zend Optimezer and ionCube work with php 5.3? ...

.htaccess - help with a rewrite rule for ssl

So I've got a website and an SSL certificate. Everything is set up and working, however, both http://example.com/checkout and https://example.com/checkout work. I'm hoping there's a way to write a rule where anything going to /checkout is rerouted to https. Ideas? ...

On site load: "Cannot read .htaccess"

Hi, I'm trying to get my website back online after recovering from an XSS attack. At the time of the attack, I set all the file permissions to 400 to take the site offline. I left it that way for a few days, and then ended up deleting all the files in the var/www/ directory and uploading a full backup of the site. The backup had screw...

Has Oracle removed Sun net.ftp classes?

I have an older project that uses the sun.net.ftp.FtpClient class to download a file from an ftp server. It appears that Oracle has finally removed this unsupported/deprecated feature from Java. Any suggestions on what should be used to replace it? I was considering org.apache classes but I have never used them. The best solution would b...

Set up a github repository for an existing LAMP set up

I have a webserver setup using the standard linux, apache, mysql, php config and I currently don't have a way of doing revision control - I just backup the whole thing every now and then. I'd like to set up a github repository for just the php and html files - basically everything in public_html. Not really sure where to get started or...

Upload Timeout Issue Under Apache/Perl

Our site provides a upload form for our members to upload photos which we then store and allow them to share. We use a simple form POST to enable the upload and then process the files with Perl's CGI.pm. Here is our Apache setup: Apache/2.0.63 (Unix) mod_ssl/2.0.63 OpenSSL/0.9.8e-fips-rhel5 mod_auth_passthrough/2.1 mod_bwlimited/1.4 Fro...

How to add custom html to the beginning of the proxy output?

Hi, I have a proxy server, but i want to add ads to the beginning of the output like many proxy providers do, but i don't know how to do that? is there an easy way like making a pac file or something like that? Note: The proxy is really normal, and can be accessed with an ip and port. Thanks ...

Forward slash in include/require doesn't go to root

Isn't for example this supposed to go to the server root on a site and get the sometext.txt from there?: <?php require '/sometext.txt'; ?> When I run this in a script, I get "failed to open stream: No such file or directory". I vaguely remember using the forward slash in a require/include function before, and that it has worked.. I ...

apache rewrite conflict

I know something's conflicting but being a mod rewrite Muggle it's time to ask for help. I am re-writing http://test.com/[name]/ to http://test.com/script.php?id=[name] with success, using: (rule#1) RewriteRule ^(.*)\/$ script.php?id=$1&%{QUERY_STRING} [L] Next, I rewrite http://test.com/[name]/foobar/[key] to http://test.com/script....

How do I configure Ruby alone with Apache + FastCGI?

Hi, There are many how-to's for people who want to use Rails with Apache and fastcgi. But I need to use Ruby alone without any frameworks (for educational purpose). So does anyone know how to configure Apache with FastCGI and to write a simple "Hello world"-style dispatcher on Ruby? ...

How to configure local web server such that it should switch between one php version to another

I'm developing one web application, using PHP eclipse IDE. For an instance i want to switch from one PHP version to another version which resides in different location. Below is my working environment : 1) Having Centos OS 2) PHP 5.1.6 have installed already while installing centos OS 3) Above PHP is installed in /usr/bin/ path 4) I...

Generic htaccess URL rewriting

Even simple .htaccess gives me headaches and I need to do the following generic mapping: http://example.com/project/controllername/key1/val1/key2/val2/.../keyN/valN --> http://example.com/project/controllername.xyz?key1=val1&amp;key2=val2...&amp;keyN=valN example: http://example.com/so/pagecontroller/id/1/time/12345/title/helloworl...