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)

6
votes
1answer
3k views

.htaccess rule to redirect from 404 to search results

When a user (or a bot) request on non existing page, I want to redirect him to the search results. I prefere to do it with the .htaccess file using something like: ErrorDocument 404 /recherche?...
2
votes
2answers
114 views

How to redirect all that URLs that does not end with “feed” to https?

I want to use Apache's mod_rewrite to redirect all URLs that does not end with /feed to a secure URL (identical, but starting with https), and leave all that ends with /feed unaltered: I want this: ...
3
votes
1answer
36 views

Getting MAMP Pro Apache to Listen on Multiple TCP Ports

I'm running MAMP Pro (Currently 3.5). I would like to be able to run Apache's standard (non-SSL) TCP on multiple ports (80 and 8080) for testing. It doesn't seem to let me do this. Adding a new TCP ...
2
votes
0answers
27 views

Strange HTTP:Accept-Language behavior instead of Browser Language Detect [closed]

My qTranslate-X (v3.4.6.4) WordPress (v4.4.2) plugin can't "Detect the language of the browser and redirect accordingly.", so i needed to do a hack by .htaccess. Following solution found in Drupal's ....
2
votes
2answers
75 views

Using one index file in all directories and subdirectories

I have an index.php file, which processes content of a directory it is located in and renders output to the browser. The problem is that the directory structure it is supposed to serve is rather ...
0
votes
1answer
31 views

How to install SSL certificate (and enable HTTPS) on VPS via command line?

I am having a bit of an issue. I have purchased an SSL certificate from GoDaddy and have it and the private key uploaded on my server. I have followed this guide but nothing is working for me. My ...
3
votes
3answers
192 views

Redirect $.html to $/ mod_rewrite rule clash

I have already remapped URL's from for example /sub/test/ to test.html but I also want to redirect /sub/test.html to /sub/test/ but here seems to be a clash between the rules. .htaccess files is in ...
1
vote
0answers
26 views

Using SetEnvIf to not log overly accessed URLs

I'm trying to figure out how to craft my SetEnvIf's in my apache config so that the server hard disk isn't spinning 24/7 over log entries. What I want to do is disable logging for all domains and ...
43
votes
7answers
124k views

What is the best Apache logs Analyzer? [closed]

What real-time log analyzer can you suggest for Apache access and error logs? There is a list of web analytics software on WikiPedia, but it would be great to hear opinions from people with ...
4
votes
1answer
145 views

SSL enforced but receiving some parts of the site are not using SSL warning

I had been trying to enforce SSL for my site but although the SSL certificate is signed properly by networksolutions, each time the pages are loaded it still displays an SSl warning in browser warning:...
2
votes
1answer
32 views

Subdomain showing incorrect content when going through HTTPS

I have a domain on my server called example.com and I set up a subdomain called links.example.com. Whenever I go to links.example.com, the domain is pointing to the same directory, even though in the ...
3
votes
2answers
40 views

Is a real http to htttps rewrite possible or is this always going to be a redirect?

I noticed that there are some articles on the Internet that talk about using the apache mod_rewrite module to rewrite a client to server http connection to https. But rewrite does all the changes ...
0
votes
0answers
9 views

Redirect old domain to new domain masking [duplicate]

HOW To Redirect www.OLDDOMAIN.com to www.NEWDOMAIN.com with masking.
4
votes
1answer
123 views

Possible to split virtual host definitions into multiple apache conf files?

I have a single server that I use to host a whole bunch of smallish websites. It's recently come to my attention that a service called LetsEncrypt allows me to get an SSL certificate for free. The ...
3
votes
2answers
158 views

Limit access to rewritten uri based on IP address

I'd like to limit access to a Drupal 7 registration page (/user/register) from certain IP addresses. I've tried to set the apache directive, but it's still letting me access it from an IP that isn't ...
1
vote
1answer
132 views

Apache 2.2 Not Identifying Safari with HTTP_USER_AGENT

I have a web server that has to meet PCI compliance requirements. Their latest round of policy changes have removed support for Safari, after having removed support for Windows XP based IE clients. ...
1
vote
2answers
89 views

best apache log file permissions on cpanel server

In an effort to protect my site from bad bots including ridiculous hackers that can login to the server, I want to secure access_log and error_log as much as possible without breaking apache or cpanel....
1
vote
0answers
71 views

How do I configure Haproxy and Apache when adding SSL?

Currently I am using Haproxy to route my application which has a websocket back end and an Apache back end. I have configured Apache's virtual host to use SSL. Now I'm confused like do I have to ...
4
votes
2answers
5k views

.htaccess directory to subdomain

I have been trying to make a subdomain from a directory (made by .htaccess) to be used as the main page starting like http://domain.com/sub/2/3/4.html and turning into http://sub.domain.com/2/3/4.html....
4
votes
1answer
49 views

Why am I getting a 301 redirect when I haven't told Apache to give one? Can WordPress push a 301 redirect?

I am setting up a development environment with XAMPP on Windows. Apache version is 2.4.17. My development url is www.hagertyforjudge.dev, also accessible at hagertyforjudge.dev. I am trying to solve ...
1
vote
2answers
379 views

Virtual host in Apache Zend

I'd like to ask you if you can tell me why I can't get Vhost in Apache to work my Vhostconf is: NameVirtualHost *:80 <VirtualHost _default_:80> ServerAdmin webmaster@dummy-host2.example....
3
votes
1answer
54 views

Trouble with 301 redirect of old naked domain to new domain

Using .htaccess I am trying to setup a simple 301 redirect which redirects both exampleA.com and www.exampleA.com (the old domain) to exampleB.com (the new domain). However, accessing www.exampleA.com ...
2
votes
0answers
48 views

Change WAMP root directory for Apache so uses a shared folder from another virtual machine

I have installed Windows on a VMWare workstation and installed WAMP on it. Also I have installed WAMP on the main system. So I have shared c:/wamp/www folder from main system to that Virtual machine. ...
1
vote
1answer
46 views

Access Forbidden XAMPP

Ok so I've been having some trouble accessing a subfolder inside a project folder. I have the following structure: -htdocs -Project -admin The problem I'm havin is when I type localhost:...
3
votes
1answer
192 views

CSS and JS are loaded from the IP address rather than from the appropriate subdomain host name

I have one VM (LAMP) with a static IP. There are two Subdomains configured on this Machine. If i browse one of the subdomains, it executes the files specified in its DocumentRoot. The problem here is ...
3
votes
3answers
2k views

Rewrite in Mediawiki, remove index.php, .htaccess

I've just installed Mediawiki on Apache and I want the URL should be: localhost/Main_Page/ localhost/Special:Recent_Changes ... instead of: localhost/index.php/Main_Page/ localhost/index.php/...
2
votes
2answers
252 views

Find domain on access_logs in Apache

I am in charge of a server that is receiving strange requests for a file that doesn't exist and it never existed and I am trying to find which account they are coming from (CentOS + Plesk) The logs ...
3
votes
1answer
83 views

Getting 406 on IE after Google redirects my site

I have a WordPress blog. When I search the posts from my site in Google, the results appear and on clicking the result I can open that particular post on my site. But while doing the same on Internet ...
6
votes
4answers
108 views

Can I manipulate the DNS protocol to host websites across multiple servers and direct users to the geographically closest?

Let's pretend that I'm hosting a very big and popular website. Let's also pretend that I have many web servers spread out all around the world. Each web server containing identical files. If I make ...
1
vote
0answers
50 views

How to deal with URL requests instead of paths from suspicious users

I have a website which has CloudFlare enabled on it (Free plan) and lately I've been getting some really weird requests which instead of GET /some/path were like this: "\xddG@\xdd\"\xb8\xbf\"\x8f\x80\...
1
vote
0answers
45 views

What memory size per apache process is ridiculous?

(closetnoc, yes I come with interesting and maybe ridiculous questions, but...) I have a question. I'm trying to make my server run as wonderful as possible and I'm in the back-end. Ever since I ...
1
vote
1answer
32 views

Which does google prefer: chained redirects or longer time-to-first-byte?

I'm clearly a webpagetest.org addict now. Once again, I tested my site after optimizing (by eliminating some file scans) and the speed greatly improved. It's now at about 150ms Time to First Byte from ...
3
votes
0answers
73 views

mod_ruid2 not working with apache 2.4.18

I thought I did good service to my server by upgrading everything to php 5.6, and apache 2.4.18 through the easyapache interface, but now, apache won't start. ! Executing custom hook '/usr/local/...
2
votes
3answers
1k views

Replace %26 in htaccess to %2526

I would like htaccess to rewrite example.com/something_%26_else into example.com/something_%2526_else I'm importing a bunch of pages that have ampersands in the title from MediaWiki. These are ...
1
vote
3answers
102 views

Simplify URL rewrites in .htaccess?

RewriteRule ^([A-Za-z0-9_\-]+)$ /userviewproducts.php?category=$1 [L] RewriteRule ^([A-Za-z0-9_\-]+)/$ /userviewproducts.php?category=$1 [L] RewriteRule ^([A-Za-z0-9_\-]+/[A-Za-z0-9_\-]+)$ /...
0
votes
0answers
57 views

Moving rewrite rules to virtualhost tags instead of directory tags

Currently, I have my rewrite rules in what I believe is in the Directory context. My relevant part of httpd config file is similar to the following: <virtualhost nnn.nnn.nnn.nnn:port> ...
2
votes
1answer
111 views

Subdomain htaccess rules

I have the following .htaccess in my root: DirectoryIndex index.html index.php Options +Indexes # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\....
2
votes
2answers
73 views

Rewrite everything that is not a file

I want to have everything that looks like this: /1/2/3/4/5/[...] to redirect to this: /index.php?u=/1/2/3/4/5/[...] unless the requested string is a specific file. So anything that doesn't have ...
3
votes
1answer
650 views

Using mod_speling with multi-level htaccess and rewriterules

We recently switched formats for managing our 301s. For the most part, everything went well, but it seems to have stopped mod_speling from working properly. Here's what we changed: Old /var/www/html/....
0
votes
1answer
212 views

Wordpress, Apache and Nginx: permalinks and cache

I have a server with Ubuntu 14.04.1, Apache at port 8008 and nginx at port 80 as a proxy for Apache. It runs a website based on Wordpress. I use Wordpress's plugin WP Super Cache with the following ...
4
votes
1answer
118 views

How to redirect URLs with a specific IDs to new URLs on a new domain name?

I want to redirect all pages where there is a specific word inside in the URL. Both websites have the same articles. For example: videos.example.com.ph/its-showtime-hashtags-hashtags-and-dawns-...
0
votes
1answer
34 views

Despite adding a CNAME record for a subdoman, the webserver is showing the server's default host

I want one subdomain to point to another on the same domain. DNS Records Type Name Value ----------------------------------------- A s1.example.com 10.20.30.40 CNAME ...
3
votes
1answer
179 views

What causes an empty referrer field in a webserver log file?

Given a log line from Apache such as the following: xx.xx.xx.xx - - [04/Jan/2016:10:42:27 -0800] "GET / HTTP/1.1" 200 6861 "-" "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like ...
1
vote
0answers
29 views

Why would a url of example.com/n (where n is the same number repeated 500x) return a 403 error?

I'm trying to add new functionality to my site which involves passing a whole bunch of parameters (could be hundreds of parameters) all encoded in base64 format. When I attempt the new URL I get an ...
8
votes
4answers
5k views

Forcing SSL and www in .htaccess

I'm looking for a way to force SSL and www. I've been able to force both separately but together I keep running into redirection issues. The following code works when handling a URL in this format: ...
2
votes
1answer
40 views

NGINX Rewriting Question

How would I convert the following Apache rule RewriteRule ^watch/([A-Za-z0-9-]+)/?$ watch.php?v=$1 [NC] into the appropriate format for an NGINX configuration file? Further edit: server { ...
3
votes
2answers
43 views

How can I make Apache wait for images to be fully written to the storage drive before serving them?

I'm using fswebcam to take pictures from my webcam and write them to /var/www so that anybody can view them from my website. The problem is that my server is a Raspberry Pi with a slow SD card. It ...
1
vote
3answers
49 views

Regular expression for Apache redirection

In the .htaccess file I would like to redirect (301): From: http://www.example.com/photo<anything> To: http://www.example.com/blog/ Basically, any URL starting with /photo should be redirected ...
1
vote
2answers
81 views

.htaccess rewrite with % in query string doesn't work

I am trying to do a rewrite of the site from http://www.example.com/folder/site?data%5Bbranch%5D=xyz to http://www.example2.com/test/ Already tried the query string but facing issues with %. Any ...
1
vote
1answer
140 views

How do I get rid of the “www” with mod_rewrite?

I want to get rid of the "www" in front of my domain, and I'm trying the following, but it's not working: RewriteEngine On RewriteCond %{HTTP_POST} ^www\.example\.com [NC] RewriteRule ^/(.*) ...