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.
2
votes
1answer
20 views
Configuring an Apache server to run Python
I currently have a website set up on an Apache server running on Redhat Linux, and am trying to configure it to be able to run Python scripts. Essentially, I want to allow Python to be executable, so ...
2
votes
1answer
111 views
How can I force a VirtualHost in Apache to not listen for undefined subdomains on 443?
In /etc/apache2/sites-available/example.com:
<VirtualHost *:443>
ServerName www.example.com
DocumentRoot /var/www/example.com/htdocs
SSLEngine on
...
2
votes
1answer
45 views
Show Cloudflare requests in apache log
I have a number of sites using cloudflare as a CDN with the apache mod_cloudflare installed to restore original visitor IPs to my server logs.
Does anyone know of a way I can make the logs identify ...
2
votes
1answer
24 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
56 views
Setting up multiple domains on one Cpanel account
I set up an account on Cpanel for a domain "abc.com". However, if I wanted to point the A record for "def.com" to abc's existing account, what changes would I have to make server side?
I'm aware that ...
2
votes
1answer
103 views
mod rewrite doesn't work when i added multiple domains
i have redhat linux server and i was using /var/www/html to display my site.
By using the following directive rewrite mod was working fine.
<IfModule mod_rewrite.c>
# Enable mod_rewrite ...
2
votes
1answer
70 views
How to find data usage of a user on my website?
I have a website (project) where users get logged in, do their work and then they log out.
I need to build a report that displays how much each person has used of data. (bandwith, how much was ...
2
votes
1answer
119 views
Internal CDN and setting up subdomain to increase maximum parallel connections
I've heard that browsers can have around maximum of 6 parallel connections per domain at a time.
So I decided to have another subdomain "cdn." then use mod_rewrite to point to media folder then ...
2
votes
1answer
156 views
Apache rewrite rule that matches a specific query string
I need to rewrite a specific wordpress url to a 404 error:
?page_id=15 => 404
How can I match the query string? Apparently Apache doesn't feed that to the rewrite mod...
2
votes
1answer
120 views
http request terminating early
I noticed that on some of my sites, images were occasionally not getting downloaded fully.
After a bit of investigation it appears that it is not restricted to images - .css, .js etc were also ...
2
votes
1answer
224 views
Remove multiple trailing slashes in a single 301 in .htaccess?
There is a similar question here, but the solution does not work in Apache for our site.
I'm trying to remove multiple trailing slashes from URLs on our site. I found some .htaccess code that seems ...
2
votes
1answer
80 views
Should I upgrade from Apache 1.3.x to 2.x?
We are in the middle of setting up a new container to migrate our ever growing web app onto. Primarily to satisfy a security audit, but also to catch up and implement missing/outdated security.
The ...
2
votes
1answer
193 views
Sitemap file getting double compressed
I have a script that generates my XML sitemap and writes it to the file sitemap.xml.gz - i.e. an XML file, compressed with gzip. This file is definitely written correctly as when I download it via FTP ...
2
votes
1answer
38 views
Finding out what features of regular expressions are supported by mod_rewrite in Apache 1.3?
Is there a particular regular expression engine that is used by mod_rewrite on Apache 1.3?
I want to know so I can get a list of supported and non-supported features.
2
votes
1answer
277 views
Avoid the login popup when using http-auth
I have an Apache. Under the DOCUMENTROOT is a folder with an .htpasswd file for http-auth. If I open the browser and request the content in the folder I get an Popup to login.
Is there a way to avoid ...
2
votes
1answer
64 views
Prevent virtual host on same server interact on apache
I have a VPS running Apache 2.0, with multiple domains and multiple IPs set.
In document root :/var/www/html/ --> i have http:// serverA.com
and I created a virtual host on folder ...
2
votes
1answer
221 views
Replace 404 with 301 to other subdomain
We have two main subdomains on our site: www.example.edu and php.example.edu. Virtually all of our content is on www.example.edu, but there are a few standalone apps hosted on php.example.edu. ...
2
votes
2answers
290 views
Apache Rewrites not working due to Akamai
I have a website which is setup with akamai. My domain and subdomains are mapped onto an Akamai IP.
I have written an Apache rewrite which does an internal URL X to another internal URL Y. This ...
2
votes
2answers
503 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
1answer
653 views
.htaccess file ignored on Ubuntu Apache 2 server
I'm having a problem with an .htaccess file on a newly installed Ubuntu server running Apache2.
The .htaccess file in the directory where the WordPress files are located isn't being take into account ...
2
votes
1answer
234 views
How do I serve dynamic WebDAV directory listings using Apache
I can use mod_rewrite to redirect /dynamic.php/xyz.php to /dynamic.php and then server different content for xyz.php using $_SERVER - where xyz.php is any arbitrary filename requested by a client. No ...
2
votes
1answer
323 views
Error 500 on phpMyAdmin via https from “self-signed certificate”?
I have used Cpanel to generate and install a self-signed certificate for HTTPS and now that I have installed phpMyAdmin once I access phpMyAdmin via HTTPS it throws out an error 500 message.
Why is ...
2
votes
1answer
755 views
Extend depth of .htaccess to all subfolders and their children
I need to be able to use .htaccess in all subfolders for full depth. E.g. I have .htaccess in public_html folder:
\public_html\.htaccess
How I make it to work for the folder small as well?
...
2
votes
1answer
58 views
How do I set up server logs?
I can't find the server access log (I think its because I have free hosting) which shows who have recently visited my website. How can I set it up manually? I have a Apache server.
2
votes
1answer
166 views
Put files outside of directory, so none can access it (Apache, PHP, MySQL)
I have a file structure like this:
public/admin
public/some folder
includes/
I set up a sub-domain page.mysite.com and I pointed the directory to be mysite.com/page/public/admin. I thought that ...
2
votes
3answers
1k views
Session cookie being dropped when moving under the SSL
The short version:
I've got a session cookie being set on a dev site but it's not being picked up when I move to the SSL (so the shopping cart empties when you go to the checkout).
When it's set on ...
2
votes
2answers
3k views
Apache http.conf allow intranet
what would be the correct config to allow only authenticated users and the intranet (without need for a password) in apache?
This does not request a password and without the "satisfy any" intranet ...
2
votes
1answer
281 views
Modify .htaccess to allow existing files without extension to be served
I have the following .htaccess:
#If the requested URI does not end with an extension OR if the URI ends with .php*
#(where * is optionally one or more numbers)
RewriteCond %{REQUEST_URI} !\.[^/]+$ ...
2
votes
1answer
78 views
Issue with permanent redirect implementation
I have a tricky problem related to 301 redirections I badly need help with.
I tried to implement these via .htaccess, but ran into trouble.
The start of my .htaccess looks like this:
SetEnv PHP_VER ...
2
votes
1answer
252 views
Opening up a static url when using Passenger WSGI with Django?
I'm currently developing a site hosted on dreamhost, using django, which is served up through passenge wsgi.
Right now, all requests are being passed to the django app. I'd like to be able to serve ...
2
votes
1answer
594 views
Enable mod_rewrite on OpenSuSE 11.04
I have a problem on OpenSuSE 11.04. I configured apache and enabled mod_rewrite but it doesn't working. on every php file I get 403 forbidden error.
2
votes
1answer
272 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 ...
2
votes
2answers
60 views
I want to redirect anyHOST.anyTLD to www.anyHOST.anyTLD
I'm trying to find a generic enough modrewrite rule that will acomplish following:
Redirect anyHost.anyTld to www.anyHost.anyTld
Not mess with any other subdomains, for examle other.anyHost.anyTLD ...
2
votes
1answer
80 views
Issues trying to run PHP4 alongside PHP5
I’m trying to get PHP4 running under CGI alongside PHP5 as a module in Apache. Long story short, I have some legacy applications that aren’t running under PHP5 and they would take a while to rewrite, ...
2
votes
1answer
58 views
When viewing an svn repository through Apache in a web browser, is there a way to specify an old revision in the URL?
I think the question says it all. I am using a server that exposes an svn repository through HTML, and am wondering if I can specify a previous revision of files when linking to it. I believe the ...
2
votes
4answers
69 views
dynamic url for member
It may be a very basic question. I am trying to user url of the form:
"membername.example.com" but I have no idea what would be the steps to be performed.
We are using apache web server.
Thanks,
...
2
votes
1answer
398 views
Problem with Expires/Cache-Control Headers
I'm using Apache 2.2.16.
I've got the following HTML file in my htdocs folder:
<html>
<link media="screen" type="text/css" href="/css/test.css" rel="stylesheet" />
...
2
votes
1answer
151 views
show content on domain.com from a sub directory
I have a domain that looks like domain.com
on the server files look like:
<www>
<mydirectory>
<otherstuff>
<asubdomain>
index.html
.htaccess
ok, so when you open the ...
2
votes
1answer
392 views
What are the AllowOverride settings if you're hosted on GoDaddy?
I'm looking for the AllowOverride setting for GoDaddy hosting, does anybody know where I can find that?
2
votes
1answer
19 views
Where does Apache get the 'last modifed' date for its automatic indexes?
I have a Solaris server running Apache, and I am using the following .htaccess to generate automatic indexes.
Options +Indexes
# SET INDEX OPTIONS
IndexOptions +NameWidth=*
Where does the "Last ...
2
votes
1answer
27 views
Force url to use www [duplicate]
I'm confused about how to force my url to use www in the address.
I have a .htaccess code like this:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
...
2
votes
0answers
48 views
How many connection can my website have? [closed]
As the traffic increased my website hangs quite regularly. The page visit is now averaging 50k per day.
The static page loads fine, but when the page has mysql request it takes too much time to ...
2
votes
1answer
76 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 ...
2
votes
0answers
244 views
RewriteBase has to change when using UserDir
I have setup our Apache server to use UserDir
This mean our urls are:
http://dev.server.com/~username/drupal/html/
Before our URLS were:
http://dev.server.com/drupal/html/
In the 2nd case I ...
2
votes
2answers
112 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
0answers
102 views
Why is AliasMatch not working?
Here is what we have:
Alias /assets/ "/home/virtual/public_assets/"
AliasMatch ^/~([a-zA-Z0-9]+)/assets/(.*)$ /home/virtual/public_assets/$2
<Directory "/home/virtual/public_assets">
...
2
votes
0answers
45 views
Replacement for DirectoryIndexRedirect for older versions of Apache
DirectoryIndexRedirect is available in version 2.3.14 and later. (mod_dir)
Is there an alternative method for older versions? I have different DirectoryIndex directive sets for a lot of directories ...
2
votes
1answer
109 views
how to fix .htaccess - redirect http://408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111
We want to use mod_rewrite and .htaccess to do a redirect. How do we redirect http://408.111.1111.domain.us/ and www.408.111.1111.domain.us/ to http://domain.us/index.php?w=408.111.1111 ? If the ...
2
votes
1answer
59 views
CDN for site with target market in Australia
I was told that http://www.edgecast.com/ is very good CDN provider for Australian market.
I have a cloud server based in Sydney Australia but was wondering whether it's even worth getting cdn as my ...
2
votes
1answer
253 views
How to avoid “chunked” Transfer-Encoding?
How to avoid chunked Transfer-Encoding ? Is there any benefit with this encoding?
Below is what appears as part of Apache Web Server (V2.4) header message:
Connection: Keep-Alive
Content-Type: ...