apache

Escaping spaces in mod_rewrite

I have the following Apache mod_rewrite rule: RewriteRule ^(.*) http://127.0.0.1:4321/$1 [proxy] This works great; Apache forwards all requests to the CherryPy server I have running on the same machine. Unfortunately, I'm having some problems with paths which have a space. If I make a request for /Sites/some%20site/image.png then Ap...

How to verify that mod_rewrite is working

I am having a lot of trouble with mod_rewrite, and for a while I had it going, but for some reason everything has stopped working. Is there any sort of basic test that I can do to make sure that it is not something fundamental broken. It does show up in phpinfo(); ...

Reading files from own domain results in 404

When I try to use curl or file_get_contents to read something like http://example.com/python/json/ from http://example.com/ I should be getting a JSON response, but instead I get a 404 error. Using curl or any other method outside my own domain works perfectly well. echo file_get_contents('http://example.com/python/json/'); => 404 echo ...

Cannot re-install apache 2.2 services on XP through xampp

I'm trying to experiment with xampp. After having some space issues, I wanted to move my xampp install onto another drive (d:). However I have the apache 2.2 services in XP services which are still pointing to my original c: install. I only see how to start and stop. I'm hoping just removing the service will fix my issues. So the questi...

.htaccess require SSL for a particular URL

I want to force Apache to use HTTPS for a particular URL in the following form: https://www.example.com/signup/* so if someone goes to any of the following example URLs directly, Apache will forward the URL over to the HTTPS equivalent site. e.g. http://www.example.com/signup --> https://www.example.com/signup http://www.example....

Apache modrewrite .htaccess question

I want to be able to rewrite a URL from: // examples http://example.com/location/New York, NY --> http://example.com/location/index.html?location=New York, NY http://example.com/location/90210 --> http://example.com/location/index.html?location=90210 http://example.com/location/Texas --> http://example.com/location/index.html?locat...

Apache/.htaccess - password-protecting a domain but whitelisting certain URIs within it

So here's what I'd like to do: access to http://example.com/* would require the user to enter a username/password, except when they go to a certain URIs (e.g. http://example.com/contact/ , http://example.com/blog/, etc.) they shouldn't have to authenticate. http://example.com (the root) should be open, too. I know I've got to set up so...

Apache Backup LDAP Repository with mod_ldap

I am currently using an Apache front end for my Subversion repository, in order to do LDAP authentication. My setup is fairly vanilla, however I would like to be able to specify a "backup" LDAP URL, in case the primary one is down. I can't currently see a way to do this other then use a second location, or virtual host that points at th...

Apache .htaccess mod_rewrite and clean urls

Ok. So I'm building this site which is accessible through two different domains. So I can't use RewriteBase in my .htaccess. The rules (below) I use to work around this problem seem to work fine. However, when I use the below .htaccess settings on my local box with clean URLS (WAMP) it all works fine but the moment I use this on the live...

PHP SimpleXML, CodeIgniter and Apache with Suhosin

I have an application I am writing in PHP5, using the CodeIgniter framework. I have it running on both Windows (using Xampp) and Ubuntu (using standard Apache, PHP, MySQL stack). I have a form, that takes XML, parses it (using simpleXML) and posts the results into a database. On Windows - no problem, works as intended. On Linux - big ...

Force Apache HTTPD to run in 32bit

I have been running Apache HTTPD in 64bit mode by stripping out the 32bit architecture from the binary (along with the ppc parts). I did this to make it more compatible for python and mysql. However I have another machine that needs it to be run in 32bit mode (it has all four original architectures still in it). Is it possible to make s...

Is mod_rewrite a valid option for caching dynamic pages with Apache?

I have read about a technique involving writing to disk a rendered dynamic page and using that when it exists using mod_rewrite. I was thinking about cleaning out the cached version every X minutes using a cron job. I was wondering if this was a viable option or if there were better alternatives that I am not aware of. (Note that I'm o...

Configure webserver:80 to direct a domain name request to a different running webserver:8080 on same machine, different port?

I run Jetty6 yet gladly place Apache in the front if needs be. I would like to have two webserver instances running on the same machine on different ports. I would like the instance on port 80 to redirect the second public domain name to the second webserver on port 8080. This should not be visible to web users. Thank you. ...

How to enable mod_dav_svn in the root directory of a named virtual host?

Is this possible? I had troubles with SVN clients not being able to access the repository with the following error message: Repository moved permanently to 'http://svn.example.com/test/'; please relocate If I added the '/' to the end of the path I was trying to access, it just strips it off again, and shows the same error message. ...

Apache Whitelist reverse proxy

We have a reverse proxy here, running Apache in version 2.2.x Essentially I want to create a whitelist so that only valid URLs will go through the proxy and be processed by the web server. How do you do this in the Apache config file, or do you need to use SQUID? ...

Setting up a Python web development environment on OSX

I'm running Leopard and wanted to know what the easy way to setup a web development environment to use Python, MySQL, Apache on my machine which would allow me to develop on my Mac and then easily move it to a host in the future. EDIT: I've been trying to get mod_wsgi installed and configured to work with Django and have a headache now....

apache user can not write to .python-eggs

I have read that I need to set the PYTHON_EGG_CACHE environment variable, or install the python library as an uncompressed .egg Which do you suggest? ...

Encoding of the AuthzSVNAccessFile

I have a repository containing paths with non-ASCII characters (latin1) I am having problems with authorization file containing those paths. Do you know which encoding should be the AuthzSVNAccessFile? Thank you. ...

apache on windows virtual directory config help

I'm running Apache on Windows XP via Xampplite, and could use help configuring my virtual directory. Here's what I'm hoping to do on my dev box: I want my source files to live outside of the xampp htdocs dir on my local machine I can access the project at http://myproject others on my local network can access the project at my.ip.addre...

What access does Apache 2.0 need in Windows Server 2003 in order to start as a service?

Until this morning, I have had Apache 2.0 running as a service using a local account which was configured with appropriate permissions. Sometime yesterday, someone must have changed something, and now Apache 2.0 won't start as a service under this account. I made the account an Administrator temporarily, and Apache 2.0 starts fine. I t...