apache

Help fix a small htaccess issue reguarding mod_rewrite

RewriteCond %{HTTP_HOST} ^[a-z]+.orbno.com$ RewriteCond %{HTTP_HOST} !^(www.)?orbno.com$ RewriteCond %{REQUEST_URI} download/ RewriteRule (.*) /download.php\?action=$1&user=%1 [L] Two small issues, this is the output: array(2) { ["action"]=> string(23) "download/email-logo.png" ["user"]=> string(0) "" } I want the user to...

Using Apache for load balancing routing

My application has two internal section: Upload section url: %URI%/upload/%action% Login section url: %URL%/Login/%action% The code for Login section is located on one server 5.123.12.1, whereas the code for Upload is located on another server 5.123.12.2. After the server routing, there will be further routing pertaining to the requ...

wget -k converts files differently on Windows and Linux

I've got GNU Wget 1.10.2 for windows and linux and the -k option behaves differently on those two. -k, --convert-links make links in downloaded HTML point to local files. On windows it produces: www.example.com/index.html www.example.com/index.html@page=about www.example.com/index.html@page=contact www.example.com/index.ht...

Mod Rewrite problem

I have a problem that I cannot wrap my head around. I'm using Apache and PHP I need to get: http://localhost.com/cat_ap.php?nid=5964 from http://localhost.com/cat_ap~nid~5964.htm How do I go about changing that around? I have done more simple mod rewrites but this is slightly more complicated. Can anyone give me a leg up or point...

Apache, .htaccess - Forbidding direct access to a file, but allow rewrites to go there

I've figured out how to write something like www.test.com/test to www.test.com/test.php. This is useful to give a simpler browsing experience and obscure the use of the PHP. However, I'd like to go farther and disallow access to www.test.com/test.php completely, and allow access only through www.test.com/test in order to prevent people f...

How to Use RewriteCond BackReferencing %N

I have the following rules in my httpd.conf RewriteEngine on RewriteBase / RewriteCond %{QUERY_STRING} password=* RewriteCond %{QUERY_STRING} bi2=(.*) RewriteCond %{REQUEST_URI} /myGet.php(.*)$ RewriteRule ^(.*)$ http://blog.myexample%1.com/$1 However, when I executed the Request URI /m...

What are best practices for permissions on Apache-writable directories?

Sometimes I want to allow users to upload files through Apache. There are two different ways I could set the permissions so that Apache can write the uploaded files to the directory. I can make the user Apache is running as the owner of the directory so that it looks like this: drwxr-xr-x 2 www admin 68 Sep 24 2007 uploade...

How can I edit the .htaccess file to deny hotlinking to .css, .inc files?

I have my functions in a file called functions.inc in my website. How can I edit the .htaccess file to deny users from viewing it by directly going to http://example.com/functions.inc ...

Unable to call system commands and shell scripts from PHP Fedora 10

I am working on an application that runs locally on a Fedora 10 machine through PHP and Apache. It depends on a process that runs in the background. The higher-ups want to be able to start/stop/restart the process, through the browser. I was trying to get this to work by having PHP make calls to the system using exec() and shell_exec,...

How to use Apache HWPF to extract text and images out of a DOC file

Hi...! I downloaded the Apache HWPF. I want to use it to read a doc file and write its text into a plain text file. I don't know the HWPF so well. My very simple program is here: I have 3 problems now: Some of packages have errors (they can't find apache hdf). How I can fix them? How I can use the methods of HWDF to find and extract...

How do I limit PHP apps to their own directories and their own php.ini?

I am running multiple PHP apps on my Mac, running OS X 10.5.6, Apache 2, PHP 5. I have subdomains setup for each project, a host file entries for each subdomain, and Virtual Directory blocks in the Apache config. So project1.localhost goes to /Library/WebServer/Documents/Project1 project2.localhost goes to /Library/WebServer/Documen...

how do I install apache portable runtime

Hi,..I am trying to install subversion on a linux machine and get I get and error saying that I don't have APR installed My question is: how do I install APR and link with with my Apache HTTP server (i have 2.2 running)? I have looked for documentation for about 2 hours now,...can't find anything...i would also like to mention that i a...

Mod Rewrite, pass parameters from URL1 to URL2

I'm trying to rewrite the following URL test.php?par1=foo&par2=bar Into... newtest.php?hidden_par=blah&par1=foo&par2=bar I have this rule, that does not work: RewriteRule ^test.php\??(.*?)$ newtest.php?hiden_par=blah&$1 [L] Could this be done using RewriteCond or something else? (say, could this be done ?), thanks in advance. ...

Apache ActiveMQ access without Spring.NET

I'm hoping someone here will be able to aid me with my struggles with integration with ActiveMQ from C#. Here's what I did so far: using Apache.NMS; using Apache.NMS.ActiveMQ; namespace JMSTest { class Program { static void Main(string[] args) { IConnectionFactory factory = new ConnectionFactory("tcp://localhost:61616/"); ...

Apache with SSL - How to convert CER to CRT certificates?

I need to setup Apache 2 server with SSL. I have my *.key file, but my certificate issuer has provided me with a *.cer file. In all documentations around the net, they are for *.crt certificates. Please let me know, are *.cer same as *.crt. If now, How can I convert CER to CRT format? ...

Allow php sessions to carry over to subdomains?

Hello I use php sessions (not cookies, except for session id cookie) for all user data, and when a user goes to their profile user.mydomain.com they are immediately "logged out" untill then remove the subdomain. Is there a way to accept sessions from all domains as long as its *.mydomain.com thanks! ...

How do you htdigest 400 user accounts?

How do you generate user accounts for 400 users to do a load testing? Htdigest forces you to type in a password each time, I have tried dos pipes like echo password > htdigest -c realm username%1 htdigest -c realm username%1 < password.txt but it is not working... ...

huge svn checkout made apache (dav_svn) consume all memory on server - any tips?

Are there any settings in apache2/dav_svn/ssl/subversion on the server that would make the whole perform better (or at least not consume all memory) on big checkouts? I'm especially interested in suggestions on how to keep memory consumption down. Reason for this question: Last week we had an issue with our svn server - it stopped res...

Same Port, but different DocumentRoots

I open up a port, let's say port 81 to listen to incoming requests. If the incoming request is www.myexample.com, then I want to redirect it to C:\myexamplemain folder. If the incoming request is blog.myexample.com, then I want to redirect it to C:\myexampleblog folder. Given that there are a lot of redirection rules for www....

Workflow for configuring apache on a webfaction account via ssh and ftp. (django/python)

I'm new at this, however, when it comes to configuring mod_python/apache or wsgi/apache I suffer. I've been able to use the python debugger tool.. pdb.set_trace() to success, especially when using the django development server, i.e. it out puts to the terminal all of the server activity, including the pdb interface. So, how does one do...