Questions tagged [apache]

Use this tag (along with an appropriate programming-language tag) for programming questions relating to the Apache HTTP Server. Do not use this tag for questions about other Apache Foundation products. Note that server configuration questions are usually a better fit on https://serverfault.com

Apache web server can be quickly and easily installed for development tasks, especially those related to PHP, Perl, and MySQL, using some packages such as XAMPP.

Note that, by historical convention, the term "Apache" is used to refer to the Apache Server Project (httpd), with which the tag is associated. This point must be clarified because the Apache Server Project is just one of over 350 open-source projects and initiatives provided by the Apache Software Foundation (also sometimes referred to simply as "Apache".)

Use the tag only for programming questions relating to the Apache HTTP Server. Note that server configuration questions may be a better fit on Server Fault.

Latest stable version

Resources

Related tags

,

92396 questions
152
votes
15 answers

How to check if mod_rewrite is enabled in php?

I was wondering if it is possible to check if mod_rewrite is enabled on Apache AND IIS in PHP. ModRewrite for IIS exists. Check it here. So, I'm looking for a PHP script that checks for mod_rewrite on Apache and IIS. Does anyone know such script or…
Ties
  • 1,776
  • 2
  • 12
  • 17
151
votes
13 answers

How to change the default encoding to UTF-8 for Apache

I am using a hosting company and it will list the files in a directory if the file index.html is not there. It uses ISO 8859-1 as the default encoding. If the server is Apache, is there a way to set UTF-8 as the default instead? I found out that it…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
151
votes
8 answers

How to debug an apache virtual host configuration?

Once again, I have a problem with my apache virtual host configuration. (The default configuration is used instead of my specific one). The problem is not really the misconfiguration but how to solve it. Does anyone has good advices to do resolve…
GaetanZ
  • 2,819
  • 3
  • 21
  • 20
149
votes
14 answers

.htaccess redirect http to https

I have an old url (www1.test.net) and I would like to redirect it to https://www1.test.net I have implemented and installed our SSL certificate on my site. This is my old file .htaccess: RewriteEngine On RewriteRule !\.(js|gif|jpg|png|css|txt)$…
Bàn Chân Trần
  • 1,890
  • 2
  • 21
  • 24
149
votes
28 answers

Apache shows PHP code instead of executing it

I have recently been trying to install PHP and Apache on my computer. After many hours, they're installed. I have modified the httpd.conf and php.ini files like everyone says. I then created a simple PHP script: But when I try…
imulsion
  • 8,820
  • 20
  • 54
  • 84
145
votes
16 answers

How to check what user php is running as?

I need to detect if php is running as nobody. How do I do this? Are there any other names for "nobody"? "apache"? Any others?
user429620
144
votes
11 answers

How to enable local network users to access my WAMP sites?

First of all, I read at least 20 articles about this topic, and not one of them can match up the scenario and I screwed up the process numerous times. So I turn help by offering my specific scenario if any help will be appreciated. Laptops or other…
ey dee ey em
  • 7,991
  • 14
  • 65
  • 121
143
votes
8 answers

deny direct access to a folder and file by htaccess

Here is the scenario: There is a index.php file in root folder some files are included in index.php which are in the includes folder. 1 other file (submit.php) is in the root folder for form submit action. I want to restrict direct user access to…
Imrul.H
  • 5,760
  • 14
  • 55
  • 88
142
votes
22 answers

How can I force users to access my page over HTTPS instead of HTTP?

I've got just one page that I want to force to be accessed as an HTTPS page (PHP on Apache). How do I do this without making the whole directory require HTTPS? Or, if you submit a form to an HTTPS page from an HTTP page, does it send it by HTTPS…
Wiki
141
votes
2 answers

how to configure apache server to talk to HTTPS backend server?

I configured apache server as a reverse proxy and it works fine if I point a backend server as HTTP. That is: I configured virtual host 443 like: ProxyPass /primary/store http://localhost:9763/store/ ProxyPassReverse /primary/store…
Ratha
  • 9,434
  • 17
  • 85
  • 163
139
votes
27 answers

WAMP/XAMPP is responding very slow over localhost

I don't know what the problem is. WAMP was very slow, so I reformatted my computer and installed WAMP. Still, accessing localhost is very, very slow, and sometimes it doesn't even load at all. I even removed it and replaced it with XAMPP, but I…
FBwall
  • 1,543
  • 3
  • 13
  • 15
139
votes
35 answers

Laravel blank white screen

My Laravel site was working before, I recently upgraded to Apache 2.4 and PHP 5.5.7. Now I'm getting a white blank screen when I go to laravel.mydomain.example, nothing in Apache error logs, routes and etc. should be fine as it worked…
Mico
  • 1,978
  • 2
  • 13
  • 17
137
votes
3 answers

Understanding Apache's access log

What do each of the things in this line from my access log mean? 127.0.0.1 - - [05/Feb/2012:17:11:55 +0000] "GET / HTTP/1.1" 200 140 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.5 Safari/535.19"
Boardy
  • 35,417
  • 104
  • 256
  • 447
137
votes
9 answers

deny directory listing with htaccess

I have a folder, for example : /public_html/Davood/ and too many sub folder in folder, for example : /public_html/Davood/Test1/ , /public_html/Davood/Test1/Test/ , /public_html/Davood/Test2/ , ... I want add a htaccess file into /public_html/Davood/…
DJafari
  • 12,955
  • 8
  • 43
  • 65
137
votes
3 answers

How does a Node.js "server" compare with Nginx or Apache servers?

I have been studying Node.js recently and came across some material on writing simple Node.js based servers. For example, the following. var express = require("express"), http = require("http"), app; // Create our Express-powered HTTP server // and…
Grateful
  • 9,685
  • 10
  • 45
  • 77