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)

1
vote
1answer
56 views
+50

Apache Rewrite Rule non-www to www + http to https + remove trailing slash

I would like to accomplish the following: rewrite non-www to www redirect from http to https remove trailing slash e.g. http://medexpress.co.uk should redirect to https://www.medexpress.co.uk ...
0
votes
0answers
7 views

Should error pages be strictly html?

I'm using PHP on Apache server I'm wondering.. If the error pages should best be served as pure and simple html? I'm thinking, this would remove any chance of repeating/complicating an error that ...
0
votes
0answers
14 views

Apache HTTPS ProxyPass certificate location

I'm trying to set up an Apache server that uses ProxyPass to pass HTTPS requests on to another server. Let's call the proxy server ALPHA and the target server BETA. ALPHA does not run HTTPS, but ...
1
vote
0answers
20 views

Apache2 and FTP

I just set up an Apache web server on my Raspberry Pi, along with MySQL and PHP5, and to upload files i set up vsftpd. The thing is that the ftp connection sent me to my pi user home directory, ...
2
votes
1answer
188 views

Is there a way to know if apache receives a request from a public IP not local to your country?

I'm looking for ways to know if an apache server receives a request , from another country (e.g germany) considering its a fair request (no spam , or proxies). I want it either to appear this as a ...
0
votes
1answer
65 views

Filtering content from response body HTML (mod_security or other WAFs)

We have Apache on Linux with mod_security as the Web App Firewall (WAF) layer. To prevent content injections, we have some rules that basically disable a page containing some text patterns from ...
1
vote
1answer
396 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 ...
2
votes
1answer
482 views

Setup basic proxypass in Apache

I have a web application that communicates to a web service deployed on the same server. The web app was written with Tibco General Interface and works well only when it is running locally on the ...
3
votes
3answers
125 views

Allowing access to an Apache virtual host from the local network only

I have a web page on a Linux server I administer, running Apache 2.2. This server is visible to the outside world for some other services. I would like to configure Apache so that a given virtual ...
1
vote
2answers
138 views

How can I rewrite a subdomain to go to a specific file in a specific folder?

I've done searching for my answer and have tested a few solutions, but nothing has worked so far. I'm trying to get a URL like this http://baseball.sports.com to rewrite to ...
0
votes
1answer
32 views

Fatal PDO Error - But PDO is enabled?

I recently switched website hosts, however with the new hosts, we are encountering some PDO problems. Everything indicates that PDO is enabled on my server, however, when I test it through php, with a ...
0
votes
0answers
15 views

convert multiple domains to a single domain

I have an apache server hosting with one IP address hosting a www and a 'sub' domain using . which worked fine until I needed an EV certificate which works on only 1 domain...and can't be used until I ...
0
votes
1answer
23 views

Page requesting content from another IP

I was running a drupal website on Server 01 with IP1 on the domain name example.com with the configuration centos 6 and apache. As we were having a traffic spike, we wanted a more powerful machine. ...
1
vote
1answer
317 views

How to configure mod_bwlimited through htaccess

The mod_bwlimited module in htaccess apparently displays an error if bandwidth is exceeded. Anyone know what options are available for configuring it through htaccess?
2
votes
1answer
662 views

What are the most commonly used and basic Apache htaccess redirects?

This question is here so we can offer users who are looking for information on how to make one or more common or basic redirects in Apache using the htaccess file. All future questions pertaining to ...
4
votes
1answer
37 views

Statically mapping a PHP script to another script using an .htaccess file results in 404 errors

After having read a lot of posts on the topic of URL rewriting, I still remain stuck with 404 status errors. My goal: A 'static' rewrite of URLs, as follows (user clicks or enters the one ...
0
votes
1answer
43 views

Redirect public traffic to a different subfolder, while local traffic remains unchanged

I would like to have local (intranet) HTTP traffic go to the /var/www/html folder while any public traffic goes to the subfolder, /var/www/html/public I've tried this configuration, with some ...
0
votes
1answer
47 views

Port numbers appended to anchor tags

I've built a static site. Locally, when I serve the content with python -m SimpleHTTPServer everything behaves normally, but when I copy the HTML onto the server and browse the site at the server's ...
0
votes
1answer
29 views

Website having 504 timeout outside of LAN

I have an Apache webserver on an ubuntu machine with 2 virtualhost websites. I set up port 80 to be forwarded and can access both sites from a webbrowser buy going to the domain URL. Working just fine ...
1
vote
1answer
6k views

How to setup mod_rewrite/htaccess to do url masking and forwarding to a subdirectory?

Its been about three years since I've played with apache and php(I've been using thin and nignx ;). So I've forgotten how to setup a mod_rewrite directive to forward all http requests from root to the ...
0
votes
0answers
6 views

Requests for site not hosted on my server [duplicate]

I am seeing http get requests in my servers access log for a site that is not hosted on my server and also the dns records of the site do not point to my server the domain points to 3 ip addresses in ...
1
vote
1answer
109 views

Can't Make Changes via FTP on my Ubuntu Server

I'm very new to server management, I literally just set this up for the first time a couple weeks ago, no idea what I'm doing. In order to allow WordPress to run updates, apparently everything needs ...
1
vote
4answers
38 views

Using a .htaccess to RewriteRule and Redirect 301 at the same time?

I have a couple of specific URLs that I want to display differently on my website, like this: RewriteRule ^contact$ contact.php To get ride of the ".php" extension. And to be SEO friendly (to ...
1
vote
1answer
25 views

Apache URL rewriting with masking and includes outside of DocumentRoot

I have an Apache 2.2.15 web server with the primary site at /web/mybiz which corresponds to http://mybiz.domain.com. We now have a new subdomain http://abc.mybiz.domain.com with the homepage living at ...
2
votes
2answers
253 views

Apache log naming conventions

I run 30+ sites out of my dedicated server (running CentOS). Some of these are subdomains. I currently use this pattern as a log file naming convention, in /etc/httpd/logs: site_com-error_log ...
5
votes
2answers
630 views

How can I disallow access to my website by its IP address?

I want my website to be accessible only by the domain name, not by the server’s IP address. How can I configure Apache to achieve this? Below are the VirtualHost configurations of Apache. ...
1
vote
0answers
160 views

In nano 000-default.conf (as root user) in Apache2 on EC2 Ubuntu Instance on AWS page is blank?

When I SSH into my ubuntu server on EC2 in Amazon Web Services, and I change to the root user using sudo su, I navigte to /etc/apache2/sites-available to make changes to the 000-default.conf file ...
0
votes
0answers
29 views

htaccess Rewrite changes the URL which I don't want

I use this rewrite rule at my local Apache server: <IfModule mod_rewrite.c> RewriteEngine On RewriteRule ^ellada\/(.*) public/index.php/$1 [L,QSA,NC] RewriteCond %{REQUEST_FILENAME} !-f ...
3
votes
1answer
269 views

How to redirect if directory does not exist or should not be seen?

I am using Apache and want to modify my .conf file for a website such that: If the request comes from my IP 1.2.3.4, just display the URL/page as requested If the request is not from my IP and the ...
0
votes
1answer
52 views

301 redirect to the new website but without apostrophes in the URL

I am trying to 301 a page that has a ' in the URL and regular redirect 301 doesn't work. Is there a way to match part of the URL until the ' and use that to 301 to a new page? Example URLs are below: ...
2
votes
1answer
35 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 ...
0
votes
1answer
24 views

How to include/install mod_proxy_http.c on JustHost

I'm using a service that requires a URL to be sent to their site so that it can return an HTML snapshot to Googles crawlers. In their .htaccess code it has the line <IfModule mod_proxy_http.c> ...
1
vote
0answers
127 views

Apache, Rewrite Rule and Directories

I'm using the current virtual host: <VirtualHost *:80> ServerAdmin webmaster@mysite ServerName example.co.uk ServerAlias www.example.co.uk DocumentRoot ...
0
votes
0answers
12 views

Only Allowing My IP with .htaccess for Maintenance Mode [duplicate]

I am attempting to redirect all users to a maintenance page, while only allowing myself to use the website. I currently have the redirect working, but cannot seem to allow myself to access the site. ...
4
votes
5answers
634 views

Is there an easier way to implement 301 redirects when converting a site to WordPress

I have just converted a website to WordPress. The old site has hundreds of hard-coded html files, and the new site does not match the old site's directory structure or file naming system (bad SEO in ...
2
votes
2answers
86 views

Remove IP address from the URL of website using apache

I'm on an EC2 instance and have a domain domain.com linked to the EC2 nameservers and it happily is serving my pages if I type domain.com in the URL. However when the page is served it resolves the ...
1
vote
1answer
77 views

RewriteRule to send all URLs with `mod` in them to the `moderator` directory

I have a .htaccess file in the root directory of my project, that contains all the rewrite rules for the site to functions. Most of these rules belong to the mod section of the site, and only two of ...
2
votes
1answer
44 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 ...
1
vote
2answers
108 views

Serve most of a domain with Apache, but use mod_proxy to serve some URLs from Lighttpd

So we wish to host some pages on a new server with apache2, and embed some of our old content & functionality from another server with lighttpd in an iframe. I'm looking at this configuration from ...
0
votes
1answer
26 views

Only IPv6 errors in apache error “file does not exist” (while the file exist in IPv4)

Situation: VPS with Apache, multiple websites. Document root is /var/www/html but nothing can be found there because the files of the websites are found in /domains/mywebsite.com/public_html/ ...
0
votes
3answers
31 views

Problem getting rewrite from subdomain to directory to work

I want to redirect demo.example.com to example.com/my-demo. This is my rewrite rule, but I'm not getting it to work on my production server: RewriteCond %{HTTP_HOST} ^demo\.example\.com ...
1
vote
1answer
38 views

How to block a wildcard subdomain in httpd.conf

So I am able to block specific subdomains like this: SetEnvIfNoCase Referer knownsub\.sorryspammer\.com sorryspammer <Location /> Order Allow,Deny Allow from all Deny from env=sorryspammer ...
2
votes
1answer
601 views

Apache htaccess results in files being downloaded instead of displayed

So I had this "beautiful" website that did exactly what I wanted it to do. Then I shut down my PC, reboot and...the pages just download now instead of being displayed. I re-installed XAMPP and ...
6
votes
3answers
3k views

Where do I create the file .htaccess, in order to serve my HTML5 cache manifest file correctly?

From a post on http://diveintohtml5.org/offline.html (Wayback Machine Copy) Your cache manifest file can be located anywhere on your web server, but it must be served with the content type ...
0
votes
0answers
17 views

IE not using AES on Website

I hope I chose the right topic this time :) So: I wanted to disable RC4 and "force" PFS on my website. Without modification, every browser used RC4. As I don't have access to the root directory I did ...
1
vote
3answers
3k views

“File does not exist” in Apache error log when mod_rewrite is using

I am getting below error in server log, when re-writing the URLs. [Fri Jan 25 11:32:57 2013] [error] [client ***IP***] File does not exist: ...
2
votes
1answer
71 views

failed httpd starting on a centos/apache web server

I installed a ffmpeg module on a web server (centos) after that httpd broke. How can I fixed it? when I typed: /etc/init.d/httpd start I got this error: Starting httpd: Syntax error on line 5 ...
4
votes
2answers
41 views

Determining if a visitor left your server

We have an Apache server running a PHP website. The site is an e-commerce shop. We currently use Barclays as the payment provider but are seeing a lot of customers drop out at the point at which we ...
0
votes
2answers
64 views

How to run WordPress and Java web app running on Tomcat on the same server?

I have to run a WordPress site served via Apache2 & Java-based webapp using Tomcat on the same server. When users come to example.com or example.com/public-pages they need to served from ...
-1
votes
2answers
30 views

How do I server multiple domains from the same directory and codebase without my configuraton breaking when apache.conf is overwritten?

I have 20 domains on a VPS running cPanel. One public_html is filled with code, the remaining 19 are symbolic links to that one. (For example, assets is a directory within public_html ... for the 19 ...