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)

3
votes
1answer
3k views

Setting file permissions on linux to allow PHP to write to a directory

I have a website built with Codeigniter and hosted on a Linux box. I am trying to follow "best practices" when it comes to my file permission settings, but I'm not sure if I completely understand the ...
2
votes
2answers
2k 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 ...
1
vote
2answers
769 views

Redirect to subdomain port 8080

I have my domain registered and running. I have installed lifray which is running on tomcat 7, my site url is iloveliferay.com:8080 and I want this to be at themes.iloveliferay.com, which file I need ...
1
vote
1answer
818 views

.htaccess RewriteRule $1 contains wrong value

I have a RewriteRule that is not behaving as I expect. I want site.com/author/fred to map to site.com/author/index.php?a=fred I have an author directory within the site root. The author directory ...
0
votes
1answer
100 views

Prevent hotlinking of attachments

People are able to embed my forum's attachments (vbulletin). I tried to create an htaccess rule for the hotlinking, but it did not work. RewriteCond %{HTTP_REFERER} !^$ RewriteCond %{HTTP_REFERER} ...
4
votes
1answer
370 views

How to organize /var/www/ for multiple users and vhosts in apache

I've been creating new directories for each site in the var folder like this: /var/www -- localhost -- owned by localuser:www-data (+setuid/setguid) /var/www-somesite -- somesite.com, ...
2
votes
2answers
179 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 ...
0
votes
1answer
120 views

Rewriting isn't doing what's expected

I've got a simple web.py application, running at Dreamhost. The .htaccess file, per the DH documentation is in the example.com home directory, not public: Options +ExecCGI AddHandler cgi-script .py ...
1
vote
1answer
783 views

How do I map some subdirectories to run alongside a Drupal site?

I have a Drupal site running on Apache using the following vhosts file: <VirtualHost xx.xx.xx.xx:80> ServerName bananas.net ServerAlias www.bananas.net ...
3
votes
2answers
7k 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 ...
0
votes
1answer
1k views

How can I fix an Apache redirect loop

I have a strange Apache/WordPress redirect loop that I can't seem to figure out. Here is the relevant logs and other info: http://pastebin.com/E1afW2vw It seems that the page request gets made, and ...
7
votes
2answers
434 views

Apache - How to NOT log 301 redirects

I recently re-designed my site and a lot of the URLs changed. I have already setup rewrite rules in Apache to redirect old URLs to the new URLs. That's all working. My question is, how can I get ...
0
votes
1answer
187 views

Virtual hosting on CentOS [closed]

I have a CentOS machine running Apache. I have a few virtual hosts set up and they run just fine. An example of a setup that's working fine is: <VirtualHost 10.10.10.38:80> ServerName ...
8
votes
3answers
581 views

Tactics for dealing with misbehaving robots

I have a site that, for regulatory reasons, may not be indexed or searched automatically. This means that we need to keep all robots away and prevent them from spidering the site. Obviously we've had ...
1
vote
2answers
171 views

Rewrite Issue on index.html

I have index.html on my html_directory on my website also I entered a rule as follows: RewriteRule ^index.html$ newindex.php It seems requests to my site is routing to my index.html file , my ...
4
votes
1answer
8k views

Configure Apache HTTP 2.2 for PUT method

I've written code for file upload and download using HttpWebRequest/HttpWebResponse class in C# with Apache 2.2 as a web server. In code I'm using request.method = "PUT". I want to config my HTTP ...
1
vote
2answers
527 views

How to block malicious requests before they reach Apache?

I have a RESTful web service that gets hit by a large number of requests coming from various IPs with dummy logins and random inputs. I have already denied these requests at the HTTP level (using the ...
0
votes
1answer
268 views

Redirect all urls to a subfolder

I have several old, broken urls that looked like this: http://www.easyjob.net/partners/whatever.html I would like to redirect them all to http://www.easyjob.net/partners/general/ The following rule ...
2
votes
1answer
564 views

Magento - Unable to access remote site but able to access a simple index.html file

I'm building a store (magento 1.6.0.0-rc2) and have a home server to host the site. It is behind a modem/router with redirection of port 80 and 3000 active to server box. 1. I can access the ...
0
votes
1answer
165 views

Is it possible to limit user access to folders using HTACCESS?

Is it possible to limit user access using a HTACCESS file? I'm not quite sure how to edit folder permissions with the host i'm with so I figure using an HTACCESS file might be easier.
1
vote
0answers
2k views

Error 504 with Apache and php [closed]

My web application works fine in development environment, but on production server gives off: 504 Gateway Time-out The server didn't respond in time. Edit: I have traced the problem to a ...
1
vote
1answer
911 views

Purposes and priorities of Apache conf files

I've installed an Apache2 server on a Linux Box (Ubuntu 10.04 TLS) and am trying to setup some virtual host and proxies. There is some stuff in the apache2.conf, an empty httpd.conf (which was used ...
1
vote
1answer
404 views

Why isn't HTTP Authentication working on this Apache HTTPS site?

I have set up a private MoinMoin wiki, accessed through HTTPS, but I cannot get Basic HTTP Authentication to work on it. I have it working on another site, using a similar vhosts file, so I cannot ...
1
vote
1answer
563 views

Can Apache “Correct” URL Case?

Let's say I keep every word of file names capitalized. For example, Home.php or MultipleWordTitle.html. Is there any way for Apache to redirect requests for incorrectly-cased URLs to the capitalized ...
0
votes
1answer
194 views

just another mod_rewrite question

from the url xxx.yyy.site.com just need to redirect to xxx.site.com Thanks for the help, sorry I have no regex/rewrite foo.
9
votes
1answer
409 views

Why chmod 777 is not secure?

chmod 777 file change the permissions of the file file to read, write, and execute for all. Ok, so the file can be manipulated in any way by any script on the server. But why is this not ...
3
votes
3answers
3k views

Enable gzip compression on Bluehost?

My website is loading large (~3mb) SVG file with jQuery. It takes quite a while therefore I decided to enable gzip compression. I have a hosting account with Bluehost which supports custom .htaccess ...
2
votes
1answer
1k 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, ...
-1
votes
2answers
2k views

Having trouble redirecting old product sites and categories to new pages

I recently upgraded a shopsystem to prestashop and imported the previous products (~1200), and I managed to keep the old category_id and product_id. I'm trying to set up those 2 rules to redirect all ...
3
votes
1answer
114 views

404 working only with wrong extension

My 404 .htaccess works very well when I put a wrong extension at it in place of .php. Unfortunately the 404 does not work when I put a wrong name with .php. This is my .htaccess code: <Files ~ ...
0
votes
2answers
90 views

How to make mod_rewrite work transparently?

Following is the content of .htaccess file <IfModule mod_rewrite.c> Options +FollowSymLinks Options +Indexes RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ...
4
votes
1answer
242 views

Prevent script execution as TimThumb exploit workaround

It's been a long time since I've done any web-development, and I never needed to administer a server myself. However, I can read manuals with the best of them, and when someone needed advice regarding ...
1
vote
1answer
4k views

What is wrong with this Apache httpd.conf file for vhosts?

What is wrong here? NameVirtualHost *:80 <VirtualHost *:80> ServerName www.apples.co.uk DocumentRoot /var/www/apples.co.uk RewriteEngine On RewriteCond %{HTTP_HOST} !^www\.apples\.co\.uk$ [NC] ...
0
votes
1answer
1k views

Mod Rewrite not working

I am trying to get the URL www.mysitedomain.com/blogs/displaynamehere to show what is in the directory at www.mysitedomain.com/blogs/blog.php$display=displaynamehere So thanks to the people who ...
5
votes
1answer
370 views

How should incorrectly encoded URLs be handled?

Just recently noticed that some sites link with the URL incorrectly percent-encoded, to which my server (LAMP) responds with a 404 Not Found. For example, for a URL of mine like this: ...
0
votes
4answers
466 views

I want to park my domain www.b.com to www.a.com. if the user visits b.com, I want the browser url to display a.com

I want to park my domain www.b.com to www.a.com So far is working, but if the user visits b.com, I want the browser url to display a.com Is there a way around it?
2
votes
3answers
132 views

How to make parameters look more attractive

I'm making a blog site and instead of the users blogs being called /blog?display=username I would like it to just be a sub domain such as mysite.com/username How would I be able to make the first ...
0
votes
3answers
3k views

What are the causes of a 416 Error?

One of my visitors from my website informed me that every so often (quite rarely actually), when trying to visit my website, he gets a 416 Error: Requested Range Not Satisfiable I've never heard of ...
0
votes
1answer
151 views

Having hard time to hide directories on my site

i'm trying to hide some directories on my site by returning 404 not found error codes instead of forbidden, the problem is that the files in the directory becomes not available to php. how can i hide ...
2
votes
1answer
421 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} !\.[^/]+$ ...
5
votes
2answers
10k views

How can I diagnose an Internal Server Error?

I was trying to host a zend-framework project on new host provider. After uploading everything and configuring the database connection I have encountered Internal Server Error message. My service ...
0
votes
2answers
104 views

How to transfer a website hosted online to my Virtual Host

I'm doing some work on a webpage, meaning I gotta modify a few things. As a result of this I installed apache and all the things that come associated with it, and also installed Joomla, and I got ...
3
votes
1answer
783 views

Apache, www-data and custom user permission

I'm running an ubuntu server with apache and I have web directory which is owned by the user www-data and the group www-data. WordPress works great in this directory. It can auto update and I can ...
0
votes
1answer
111 views

can mod_rewrite be used for this problem?

We used to have a URL http://www.abc.com/index.php?itemID=144 which is moved to http://www.abc.com/index.php?itemID=1556 we want our users which are hitting the above url(144) to reach to 1556. ...
1
vote
1answer
35 views

Mod Rewrite change extention of a page

i want to mod rewrite change extension of any page to what i want. for ex. i want change index.php to index.abc is it possible with mod rewrite?
1
vote
1answer
143 views

Apache redirecting: reason unknown

I have a simple php script. The script is not important. It just prints out $_SERVER. When I request an URL like www.server.com/?ref=bar everything is fine. However if the request contains something ...
2
votes
1answer
470 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 ...
0
votes
1answer
140 views

Switch to https

I'm looking to use an .htaccess file to use mod_rewrite to switch the protocol from http:// to https:// when someone hits my website. For instance, once someone goes to: http://www.mywebsite.com/ ...
1
vote
1answer
62 views

Is it possible for a web-server to send more files than requested for, and have the browser accept them?

I've created a basic web server for a school project, and it serves static content without a problem. I thought of having the server parse all htm/html files for links to .js/.css/image files, and ...
2
votes
1answer
92 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 ...