The Apache HTTP Server is an Open Source Web server, which originated from a series of patches to the NCSA HTTPd. Apache is the world's most popular Web server, which is run on 54.90% of all Web servers according to the Netcraft survey conducted July 2010.

learn more… | top users | synonyms (1)

2
votes
1answer
489 views

Apache logging based on user agent

I'd like to update my apache logging so that its destination is based on the user agent string or file type. Specifically, I would like to send my googlebot requests to their own log file, and I ...
2
votes
1answer
1k views

=~ (equal-sign tilde) and m“ … ” in .htaccess directive

I saw this bit of code on an old forum post: SSLRequire %{HTTP_HOST} =~ m"\.secure\.powweb\.com" And I was just wondering what the =~ and m" ... " meant. I've been searching online and in the ...
2
votes
1answer
217 views

Cache control header specified in .htaccess is not working for static files

I'm trying to use Google PageSpeed Insights to speed up my website - www.edmhunters.com. First off, here is what my .htaccess file looks like # ...
2
votes
3answers
2k views

Physical memory usage issues with WordPress plugins

Occasionally, my website that's hosted with GoDaddy is crashing due to physical memory overload. My host told me that PHP processes are overloading the server, and to try to find out which WordPress ...
2
votes
2answers
163 views

How to prevent JavaScript directory access with htaccess

I have a website like http://example.com but the problem with it is that people are able to get access to my JavaScript by pointing a browser to http://example.com/js/. I have little knowledge of ...
2
votes
1answer
1k views

Apache VERY high page load time

My Drupal 6 site has been running smoothly for years but recently has experienced intermittent periods of extreme slowness (10-60 sec page loads). Several hours of slowness followed by hours of normal ...
2
votes
3answers
153 views

Fastest way to redirect dead URLs to home page

A client of mine scrapped his entire wordpress site of many years for a custom CMS. The URL structures both use the /<post_title> format, so a pattern based .htaccess rule is out of the picture ...
2
votes
1answer
793 views

Best practices for serving multiple sites with Apache2 [closed]

I have a server with a number of virtual hosts. Over the last couple of years I have continually been improving on most parts of serving these sites, everything from how and where to do logging, how ...
2
votes
3answers
372 views

Clean URLs issue using .htaccess in PHP project

I am working on a PHP laravel project. I am currently facing issues with .htaccess file. I have following .htaccess: <IfModule mod_rewrite.c> Options -MultiViews RewriteEngine On RewriteBase / ...
2
votes
1answer
4k views

301 Redirect from www to non-www without using VHOST

I have my web application running on EC2 with Apache. I want to redirect www to non-www. On searching Google, I used this but it leads to redirect loop: <VirtualHost *:80> ServerName ...
2
votes
2answers
1k views

apache rewriting url doesn't work(using godaddy hosting)

I'm using a framework to create my website(codeigniter) by default the urls are like this:mysite.com/index.php?/etc/etc/etc. And I'm trying to remove the index.php?, I tried to remove it by doing ...
2
votes
1answer
457 views

Tell apache to point to a subfolder as default starting point for public

What would be the different methods of telling Apache to serve up httpdocs/public instead of httpdocs as the default starting point? I want to be able to have my includes and logs directories behind ...
2
votes
1answer
529 views

Htaccess - Rewrite png to php file

I currently use trans.png.php?id=1&campaign=test to track my newsletter campaigns. I want to use trans.png instead as it's the src of an img tag. How can i do this in htaccess? Also is there any ...
2
votes
1answer
147 views

Is it possible to check the case on Apache redirects or aliases?

I have a big website (15,000 pages) with a log list of redirects (about 800) that have been used in marketing pieces for years. My Apache server has been running mod_rewrite for the past 10 years or ...
2
votes
2answers
2k views

How to manage multiple domains on same server

I have more than one (4 to be exact) domains and only one server host with same ip. How I can run all my domains from same server. All websites are wordpress sites.
2
votes
2answers
397 views

Image Hot-links & Google's Instant Previews

I'm trying to adjust my site: 1. stop Image Hot-links 2. block Googlebot-Image (because I do not want my images to be searchable) 3. allow Google's Instant Previews I've tried this but the Instant ...
2
votes
1answer
362 views

Configuring directory access on a server. .htaccess and alternatives?

I have written a small PHP package/site-template (should I say). It contains a directory data/ that contains some important files that the users should not be able to see. These file should however ...
2
votes
1answer
37 views

Is minimising the number of Include directives in Apache config faster?

In my Apache config file for domains hosted on my site, I have a couple of Include directives containing redirects: <VirtualHost 127.0.0.1:8080> Include /path/redirects1.conf Include ...
2
votes
1answer
2k views

http://www.example.com/http://www.example.com/ in Apache log?

I run a website, let's say www.example.com. On it I have a path and file, say www.example.com/path/file.html. The Apache log lists GET requests like: GET /path/file.html HTTP/1.1 Which is correct, ...
2
votes
2answers
960 views

Redirect all traffic to construction page except my IP in .htaccess

The title pretty much says it all. I want to direct all traffic to an under construction page except for traffic originating from my IP address so I can move a large development site into production ...
2
votes
1answer
155 views

Apache mod_rewrite problem

I try to use Apache mod_rewrite to redirect some pages on my customer's website to the homepage. The .htaccess file is the following: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / ...
2
votes
2answers
1k views

How can I redirect everything but the index as 410?

Our site shut down and we need to give a 410 redirect to the users. We have a small one-page replacement site set up in the same domain and a custom 410 error page. We'd like to have it so that all ...
2
votes
3answers
281 views

How to use .htaccess to show smarter URLs

I'd like to ask how can I call the page www.domain.com/index.php?page=somepage and make the browser show the user in the URL bar the address www.domain.com/somepage/? How do I do that trick?
2
votes
1answer
34 views

How to add the ‘www’ prefix to my domain

I am trying to add www to my domain. I have the custom PHPcode on live server. I have workout GoDaddy forward options also but still my domain not forward. I have a site designed in Core PHPand was ...
2
votes
2answers
101 views

Browser will not cancel the request if routed through PHP

I have a site which has a feature that causes Apache to route all requests for files in a particular directory through a PHP script via .htaccess. A problem has come up that I'm not sure how to ...
2
votes
1answer
110 views

Proxy pass from apache to jetty using localhost

In my `/etc/apache2/sites-enabled file I have two proxy pass statements: one to a Virtuoso server which works with localhost and one to a jetty server on localhost which doesn't, because "Firefox ...
2
votes
1answer
152 views

Rewrite up to three folders into three query string parameters to a PHP script

I'd like to use mod_rewrite within the .htaccess file to rewrite folders to a var string. Below is examples of current and what I would prefer. Current URL: example.com/main/folder1/folder2/folder3 ...
2
votes
4answers
64 views

Redirect example.com:81 to example.com

I need to redirect www.example.com:81/site/ to www.example.com. I have used mod_rewrite a few times, is it possible to solve this in a similar way?
2
votes
1answer
61 views

Mapping a domain to my virtual server using an A record

I bought a virtual server from Hetzner. It has Debian 7.0 minimal installed, and I also installed Apache server using apt-get install apache2. That's about everything I did on the server. This URL ...
2
votes
1answer
179 views

How should I set up and use a CDN for my web application?

I plan to create and run my own CDN. Currently, media and other static content is being served by the web-servers which are behind a load balancer which is a waste of resources. The network structure ...
2
votes
1answer
276 views

Upgrading Apache 2.2 to Apache 2.4 [closed]

I'm planning to upgrade Apache 2.2 running on my centOS 6.5 server to Apache 2.4, Does the new Apache version worth the update?
2
votes
1answer
71 views

Rewrite one URL to another, and then block the first one using Apache mod_rewrite

Description: I've changed with RewriteRules (no redirect) a typical PHP-like URL: domain.com/script.php?parameter=value to more friendly one: domain.com/script/value But I still can reach the ...
2
votes
1answer
157 views

Go up one directory in mod_rewrite

I've got a standard Zend Framework 1 project that looks a bit like this: Project |- public |- .htaccess |- index.php The .htaccess looks like this: RewriteEngine On RewriteBase / RewriteRule ...
2
votes
1answer
57 views

Handling APACHE file caching

I have used .htaccess to cache images, css and javascript files on my server for up to a month. My problem is that some users get updates that I made recently and all works normally while some user ...
2
votes
2answers
1k views

Is it possible to count the number of hits or loads of a webpage without anything fancy?

I know very little, but I do know that I have some server space given by my University with a file called public_html which anyone can load html and other files from. So is there a simple way to add ...
2
votes
1answer
56 views

How should I set the default virtualhost?

I want to run 2 websites. One for www.example.com, and the other for everything else (www.example2.com, www.example3.com) How I do it? I tried: <virtualhost *:80> ServerName www.example.com ...
2
votes
1answer
1k views

How to log username in Apache logs?

I need some help regarding how to log the user-name into apache logs. I'm building a use-case for Security Information Event Management. Is the method the same in case of IIS or just applicable to ...
2
votes
1answer
476 views

How do I use htaccess to make a short URL to a MediaWiki page?

I'd like to rewrite /liam to /index.php/Liam_Edwards-Playne. I've currently written this below in the appropriate .htaccess file but it is still returning a 404: RewriteEngine On RewriteRule ^/liam$ ...
2
votes
1answer
2k views

Tomcat serving static content with directory listings

I have Tomcat 7 configured to serve static contents from a directory: <Host appBase="webapps" name="localhost"> ... <Context docBase="/var/projectA/static" path="/projectA/" /> ...
2
votes
1answer
246 views

Apache2 Unwantingly Allowing Proxy Requests

I'm not sure if this is the right location, but this is fairly urgent. I have completely removed all traces of mod_proxy and the other mod_proxy mods, although the Apache server continues to allow ...
2
votes
1answer
3k views

Help with 301 redirect from subdomain to root domain

I need to forward existing subdomain links to the root domain as the subdomain no longer exists. I have tried so many different lines of code in my .htaccess file and can not get the redirect to work. ...
2
votes
2answers
825 views

getting 500 intenal error when setting 301 redirect using .htaccess

I am trying to use a 301 redirect to direct users and bots to my new site but when I put the .htaccess live i keep getting a 500 internal error shown. The site is actually a subdomain which i want ...
2
votes
3answers
1k views

Under an Xampp install, I modify the apache httpd-vhosts.conf file and then my Apache server will not start

I have read all the articles but still must be doing something wrong... I modified the httpd-vhosts.conf file to access the project I am working on... I have tried many different configurations and ...
2
votes
1answer
75 views

Handling request after installing MAMP (no DNS setup yet)

I've just installed MAMP on my mac machine and checked the server is working by looking at localhost. I looked up my IP address by ifconfig. When I use another machine, I still can't get connected to ...
2
votes
2answers
543 views

Notification for too many Apache connection errors on shared hosting?

My hosting provider specifies how many simultaneous connections the hosting account can handle. The question is how do I know if my site reached this limit and drops connnections? I have a PHP site ...
2
votes
2answers
669 views

Nginx frontend, Apache backend, and Magento

I've got a Magento installation, which works perfectly from a customer's point of view. However, when you try and do batch tasks with the admin, Nginx often closes the connection to the browser early, ...
2
votes
2answers
3k views

Is it possible to force a directory index to display even if an index file exists?

On my Apache server I need to display a directory index of a given folder even if it already contains an index file that has been defined in DirectoryIndex. In this case an index.html file exists, but ...
2
votes
2answers
182 views

Apache2: Deny access for mail.mydomain.com but allow www.mydomain.com, both points same ip

i have a linux mail+http server located throguh Internet at www.mydomain.com. Domain was bought at GoDaddy so after configuring the server and getting the public ip address i went at GoDaddy's profile ...
2
votes
1answer
478 views

Virtual Host under MacOSX not working

I have setup a virtualhost for MacOSX Apache installation. These are my steps: edit /private/etc/apache2/httpd.conf removing comment from: Include /private/etc/apache2/extra/httpd-vhosts.conf ...
2
votes
1answer
388 views

Restrict SSL access for some paths on a apache2 server

I wanted to allow access to www.mydomain.com/login through ssl only. E.g.: Whenever someone accessed http://www.mydomain.com/login, I wanted him to be redirect to https://www.mydomain.com/login so ...