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
136
votes
13 answers

Does PHP have threading?

I found this PECL package called threads, but there is not a release yet. And nothing is coming up on the PHP website.
Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
133
votes
18 answers

Remove .php extension with .htaccess

Yes, I've read the Apache manual and searched here. For some reason I simply cannot get this to work. The closest I've come is having it remove the extension, but it points back to the root directory. I want this to just work in the directory that…
Dirty Bird Design
  • 5,333
  • 13
  • 64
  • 121
132
votes
14 answers

WebSockets and Apache proxy: how to configure mod_proxy_wstunnel?

I have : Apache 2.4 on port 80 of my server, with mod_proxy and mod_proxy_wstunnel enabled Node.js + socket.io on port 3001 of the same server Accessing example.com (with port 80) redirects to 2. thanks to this method with the following Apache…
Basj
  • 41,386
  • 99
  • 383
  • 673
131
votes
12 answers

Apache VirtualHost 403 Forbidden

I recently tried to set a test server up with Apache. The site must run under domain www.mytest.com. I always get a 403 Forbidden error. I am on Ubuntu 10.10 server edition. The doc root is under dir /var/www. The following are my settings: Content…
Yuchen Wang
  • 1,682
  • 2
  • 14
  • 16
130
votes
3 answers

www-data permissions?

So I have a directory in /var/www (called cake) and I need to allow www-data to write to it, but I also want to write to it (without having to use sudo). I'm afraid to change the permissions to 777 in case some other user on my machine (or a hacker)…
q3d
  • 3,473
  • 8
  • 34
  • 39
128
votes
4 answers

Setting environment variables for accessing in PHP when using Apache

I have a Linux environment and I have a PHP Web Application that conditionally runs based on environment variables using getenv in PHP. I need to know how these environment variables need to be set for the application to work correctly. I am not…
Abishek
  • 11,191
  • 19
  • 72
  • 111
127
votes
5 answers

How can I convert a PFX certificate file for use with Apache on a linux server?

How can I convert a PFX certificate file for use with Apache on a linux server? I created the PFX from Windows Certificate Services. The PFX contains the entire certificate chain. (Which is just a root and the main cert, no intermediate.) Lead me,…
AaronJAnderson
  • 1,698
  • 4
  • 18
  • 25
127
votes
34 answers

Getting a 500 Internal Server Error (require() failed opening required path) on Laravel 5+ Ubuntu 14.04

I have installed Laravel many times on Windows OS but never had this problem. However, on Ubuntu 14.04 I am getting a 500 Internal Server Error, and messages like this in my logs: [Wed Jul 22 10:20:19.569063 2015] [:error] [pid 1376] [client…
DpEN
  • 4,216
  • 3
  • 17
  • 26
126
votes
9 answers

How to debug .htaccess RewriteRule not working

I have a RewriteRule in a .htaccess file that isn't doing anything. How do I troubleshoot this? How can I verify if the .htaccess file is even being read and obeyed by Apache? Can I write an echo "it is working" message, if I do write it, where…
macha
  • 7,337
  • 19
  • 62
  • 84
126
votes
9 answers

index.php not loading by default

I have just installed CentOS, Apache and PHP. When I visit my site http://example.com/myapp/, it says "forbidden". By default it's not loading the index.php file. When I visit http://example.com/myapp/index.php, it works fine. Any idea how to fix…
001
  • 62,807
  • 94
  • 230
  • 350
124
votes
8 answers

How to change port number for apache in WAMP

I am new to WAMP server and installed it on my system but after installing it when I check it by going to localhost url like this http://localhost/ in the browser it is not working. I am getting a 404 error and blank page. This is because my 80…
vishal_g
  • 3,871
  • 4
  • 21
  • 34
124
votes
6 answers

How do I resolve a HTTP 414 "Request URI too long" error?

I have developed a PHP web app. I am giving an option to the user to update multiple issues on one go. In doing so, sometimes the user is encountering this error. Is there any way to increase the lenght of URL in apache?
JPro
  • 6,292
  • 13
  • 57
  • 83
124
votes
11 answers

error_log per Virtual Host?

On one Linux Server running Apache and PHP 5, we have multiple Virtual Hosts with separate log files. We cannot seem to separate the php error_log between virtual hosts. Overriding this setting in the of the httpd.conf does not seem to do…
Michael Stum
  • 177,530
  • 117
  • 400
  • 535
123
votes
8 answers

Apache Prefork vs Worker MPM

Looking at the Apache config file, I see Prefork and Worker MPM defined. What is the difference and which one is Apache using?
Cory
  • 14,865
  • 24
  • 57
  • 72
122
votes
8 answers

What is the difference between CloseableHttpClient and HttpClient in Apache HttpClient API?

I'm studying an application developed by our company. It uses the Apache HttpClient library. In the source code it uses the HttpClient class to create instances to connect to a server. I want to learn about Apache HttpClient and I've gone trough…
Nayana Adassuriya
  • 23,596
  • 30
  • 104
  • 147