apache

.htaccess File Options -Indexes on Subdirectories

I have the following .htaccess line, simple no indexes on root. Options -Indexes What do we add so it propagates to any sub directory instead of having to create one file for each? One .htaccess on root only. ...

Error installing Apache (libaprutil)

While installing apache, I got this error message: libtool: install: error: cannot install `libaprutil-1.la' to a directory not ending /some_directory What's wrong? NOTE: I already figured out the issue, but since searching Google was not very helpful, I wrote up this question in the hope of helping others, and possibly myself, with...

howto mod_rewrite every request to index.php except real files but exclude one real directory?

Let me explain my situation: I'm using a MVC framework (CodeIgniter), so every request gets rewritten to my index.php file, which in turn routes this to my classes and functions. Offcours if there are requests for real files they should not be processed by scripts but directly send from webserver to browser. Owkay no problem, the fol...

How to write this URL rewrite rule?

Using LAMP, is it possible to write rewrite rules to redirect URLs like the following? http://example.com/topic/142 -> http://example.com/static/14/142.html --Edit-- The rule is to get ID's first 2 numbers as folder name, then ID.html. ...

Ignore symlinks in clean URL's in .htaccess

Example URL: example.com/user /user is both a symlinked directory and a valid URL to content on my site. I user Horde Routes to request the content and all requests to the site go through index.php. I currently have a .htaccess file that looks like: Options +FollowSymlinks RewriteEngine on RewriteCond %{HTTP_HOST} ^example.com$ [NC] ...

Apache Hotlink Protection for Download Folder

Hello, I'm trying to avoid direct links from other sites to my site's downloadables. My exe,zip and msi files are under /files directory. How can I avoid direct links to them? Thanks in advance... ...

How to check the presence of php and apache on ubuntu server through ssh

Hello, I am not much into linux, so can any body please guide me how can I check whether the apache is installed with php and mysql on ubuntu server through ssh. Also if installed in which directory. And if in case some other package is installed like lighttpd. Thank You. ...

Apache HttpClient doesn't work.

I have: ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 I just downloaded "Commons HttpClient 3.1 (legacy)" from http://hc.apache.org/downloads.cgi . I created new application with IDE NetBeans. I focused on Projects -> Libraries -> Add JAR/Folder and here added commons-httpclient-3.1.jar By now, I can write "import org.apache.commons.httpc...

Website Session Analysis

I'd like to know the best way to deep dive into the flow of my users. For example, I have 4 pages in my flow, how can I analyze which users abandon on which step? I can definitely do it by hand with logging, etc, but I'd rather use an off the shelf solution. I have apache request logs, as well as google analytics. Can these analyze user...

Installing a fresh downloaded php package ubuntu server

Hello, I am trying to setup my ubuntu server, but it seems to me that the php package downloaded has got corrupt as it is not installing the whole package. When I am trying to reinstall after removing the package with sudo apt-get install php5 it uses the same package which it had downloaded earlier but i want to download a fresh copy ...

Moveable type images not displayed

I installed Moveable type on a ubuntu box. The admin section works great. However the front page does not. The images and CSS are not displayed. This is coming from the apache error log: Permission denied: exec of '/var/www/mt/example/styles.css' failed Premature end of script headers: styles.css I think it's related to my apache con...

Multiple SSL Certificates Running on OSX 10.6

I have been running into walls with this for a while. I am attempting to setup multiple IP addresses on Snow Leopard so that I can develop with SSL certificates. I am running XAMPP - I don't know if that is the problem, but I guess I would run into the same problems, considering the built in apache is turned off. So first up I looked i...

Make Domain-Specific folder redirect using .htaccess rules?

I recently moved a files/images folder on my site (a Drupal installation) from /sites/default/files/ to /sites/example.com/files/, but there are now a lot of 301 errors from external hotlinking sources, and I'd like to redirect inbound links from the old 'default' path to the new 'example . com' path, but only for this one domain... Bas...

URL Rewriting every URI except one?

I have a need to rewrite all URLs except /admin/ to index.html. How would I achieve that with .htaccess? I know I need RewriteConds and writes, but everything I have tried ends up in 500 Internal Server Error. ...

Why is my LAST rule [L] not working in apache?

Background, I'm running a Zend Framework application. Trying to squeeze the most performance out of it as possible. So I'm trying to move the rules out of .htaccess exactly to the letter per this blog post by the author of a Zend Framework book: http://www.armando.ws/2009/03/how-to-run-zend-framework-with-no-htaccess-file/ So basically,...

Apache virtual host configuration on debian

Migrated to Server Fault Apache virtual host configuration on debian Im new to apache configuration and would be really glad if someone helped me with the following.Im running apache on a virtual private server, running the debian operating system. In /etc/apache2/sites-available, i have two virtual hosts defined,site1.com.conf and si...

Software/system to serve large quantities of images?

At our peak hour we need to serve around 250/rps. What we're doing is accepting a url for an image, pulling the image out of memcache, and returning it via Apache. Our currently system is a dual-core machine with 4GB of memory: 2GB for the images in memcache and 2GB for Apache; but we're seeing a very high load (20-30) during our peak ...

Why does browser sends HTTP GET requests that return empty responses?

I tried to post this question on serverfault but no luck so far. I have a local testing environment in a Fedora virtual machine. Strangely, resources (css and js files) don't seem to load. Looking at Firebug, I see that the browser sends the HTTP request with "Range bytes=0-". The server responds with either an empty 200 OK or an empty ...

apache proxy to tomcat keep alive confusion

I have an apache 2.2 server infront of a tomcat 6 server. using mod_proxy_ajp on apache to proxy requests to tomcat. pretty standard setup. If I need to disable keep-alive connections for browsers, how do i do this? I need to do disable keep-alive http requests because i suspect some of my users have firewalls that might be dropping an...

Log files not being written to (Passenger)

Locally, my app runs fine on and writes to its logs. My production server is running CentOS with an Apache server running Passenger. When trying to debug, I noticed my log files were not being written to. First thing I did was chmod 0666 them, and when I found out that didn't work I looked at my apache log. I found this: Rails Error: Un...