Questions tagged [apache2]

The Apache HTTPd Server. When asking questions about virtualhosts, please include the output of the following command: "apache2ctl -S" (or "httpd -S" depending on your OS)

The Apache HTTP Server is a popular Open Source Web server. This tag should be used for general questions about Apache HTTPd.

Although there is large degree of commonality between the different versions in the 2.x branches, please consider using the Apache-2.2 or Apache-2.4 tags instead for more specific Apache HTTP Server related questions.

Documentation for all major versions is both comprehensive and has a high degree of accuracy.


1650 questions
7
votes
1 answer

Reason for "Gateway Timeout" (mod_wsgi)

I get "Gateway Timeout" 504: The gateway did not receive a timely response from the upstream server or application. I use apache with mod_wsgi Version 4.4.8. In the apache error log I see: Timeout when reading response headers from daemon process…
guettli
  • 3,113
  • 14
  • 59
  • 110
7
votes
3 answers

Nginx 444 error eqivalent in Apache?

Is there any way to produce same Nginx 444 error in apache. Nginx 444--> Connection Closed Without Response. I like this error since if anyone tries to CURL he gets an empty response, but not so in Apache.
Amanat
  • 87
  • 1
  • 3
7
votes
3 answers

How can I remove IP addresses from log files after some time

I have an apache/nginx/whatever web server which logs client IP addresses to the access logs. Now these log files are rotated via logrotate. I want to keep the IP addresses for some days, then after 7 days, I want to remove the IPs from the log…
Michael Siebert
  • 213
  • 2
  • 7
7
votes
2 answers

Apache's htcacheclean doesn't scale: How to tame a huge Apache disk_cache?

We have an Apache setup with a huge disk_cache (>500.000 entries, >50 GB disk space used). The cache grows by 16 GB every day. My problem is that the cache seems to be growing nearly as fast as it's possible to remove files and directories from the…
flight
  • 384
  • 3
  • 14
7
votes
1 answer

Apache2 access.log has multiple lines that say "combine"

I'm running an Apache2 webserver on Ubuntu 20.04.2 LTS. I noticed that my access.log has several lines that simply say combine on them, with no information about the request or anything else. There are other lines in the access.log that do not say…
Noah Broyles
  • 179
  • 6
6
votes
1 answer

What is the difference between default-ssl.conf and what is 000-default-le-ssl.conf?

default-ssl.conf is quite self-explanatory. I assume it's for default values that would be used when no vhost or other config overrides it. But what exactly is 000-default-le-ssl.conf file? Why is it named the way it is? What's with the triple zeros…
DominicM
  • 211
  • 3
  • 5
  • 10
6
votes
1 answer

Virtual host not working AWS apache

I have following virtual host ( in apache2.conf file ) to load all subdomain from a single directory on AWS DocumentRoot /var/www/html ServerName mydevsite.com ServerAlias mydevsite.com
Vikram
  • 167
  • 2
  • 10
6
votes
2 answers

Unable to limit Apache server-status page to localhost

I am using Apache 2.4.18 on Ubuntu. I want to allow reading server status only from localhost. In /etc/apache2/mods-enabled/status.conf I have: SetHandler server-status Require ip…
Madoc Comadrin
  • 540
  • 3
  • 11
  • 28
6
votes
2 answers

Redirect all urls to the root except /wp-admin and wp-json

I try to redirect all urls to the root except for the wordpress administration and the wordpress REST API. I have these rules in my .htaccess: RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond…
Quentin Brosse
  • 63
  • 1
  • 1
  • 4
6
votes
1 answer

Apache's mod_rewrite and PHP's REQUEST_URI variable

I have an issue with Apache passing to the PHP $_SERVER['REQUEST_URI'] variable the URL after it has been rewritten rather than the original one requested. I am doing this rewriting because I had a WordPress website and wanted to move it to a…
Mg512
  • 61
  • 1
  • 3
5
votes
1 answer

How to have apache handle .well-known/acme-challenge and still have / passed to wsgi

In order to support automatic LetsEncrypt certificate renewal certbot uses the --apache handler. e.g. certbot renew --apache This handler installs a temporary VirtualHost for */.well-known/acme-challenge/ on the Apache server in order authenticate…
Jay M
  • 358
  • 4
  • 10
5
votes
2 answers

Apache Virtual Hosts - Map different paths of the same domain (or IP) to different sites

I'm running Apache/2.4.29 (Ubuntu). I have only one domain name. I would like to map different sites to different paths after the domain name. For example: mydomain.com/test001 maps to /var/www/test001/public mydomain.com/test002 maps to…
Roger 71
  • 91
  • 1
  • 7
5
votes
1 answer

"systemctl start service" when service already started

I, what happen's precisely when you run systemctl start apache2 (or other service) while service already started ? Can it cause trouble to start several hundred times a day apache2 service? (to prevent the service from shutting down) or can it use…
user2267379
  • 205
  • 2
  • 8
5
votes
4 answers

How to migrate letsencrypt renewal from apache2 to nginx

I inherited a very new magento configuration from a previous employee (who left for another job) where I currently work. The original Magento was set up with v2.1.8 but I have had to update/upgrade the installation a number of times as the…
Scott
  • 153
  • 1
  • 6
5
votes
0 answers

Does the default Apache build not have PIE (position independent executable)?

I just built Apache from source, not something I usually do, and noticed that one of the build options was: --enable-pie This builds httpd as a Position Independent Executable which as I understand prevents ROP exploits. I would have expected this…
Tyler Durden
  • 467
  • 1
  • 5
  • 15