Skip to main content

Questions tagged [apache-2.4]

Version 2.4 of 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)

Filter by
Sorted by
Tagged with
135 votes
3 answers
370k views

What does Apache's "Require all granted" really do?

I've just update my Apache server to Apache/2.4.6 which is running under Ubuntu 13.04. I used to have a vhost file that had the following: <Directory "/home/john/development/foobar/web"> ...
John Crawford's user avatar
101 votes
4 answers
350k views

How does ServerName and ServerAlias work?

It's the following part of a virtual host config that I need further clarification on: <VirtualHost *:80> # Admin email, Server Name (domain name), and any aliases ServerAdmin example@...
njp's user avatar
  • 1,112
86 votes
5 answers
191k views

How do I redirect subdomains to a different port on the same server?

I have some subdomains I want to redirect to specific ports on the same server. Say I have dev.mydomain.com I want dev.mydomain.com to transparently redirect to mydomain.com:8080 and I want to ...
user avatar
57 votes
9 answers
189k views

How can I disable TLS 1.0 and 1.1 in apache?

Does anyone know why i can't disable tls 1.0 and tls1.1 by updating the config to this. SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 After doing this, i reload apache I do an ssl scan using ...
David's user avatar
  • 683
56 votes
3 answers
67k views

How to fix 'logjam' vulnerability in Apache (httpd)

Recently, a new vulnerability in Diffie-Hellman, informally referred to as 'logjam' has been published, for which this page has been put together suggesting how to counter the vulnerability: We have ...
Christophe De Troyer's user avatar
45 votes
1 answer
234k views

Apache is OK, but what is this in error.log - [mpm_prefork:notice]?

My apache server is running OK without any problems. It also doesn't issue any warning during restart. However, if I examine error.log I can see the following lines repeating from time to time: [Wed ...
Max Koretskyi's user avatar
38 votes
4 answers
76k views

Using Https between Apache Loadbalancer and backends

I am using an apache (2.4) server configured as loadbalancer in front of 2 apache servers. It works fine when I use http connections between loadbalancer and backends, however using https does not ...
user3240383's user avatar
36 votes
13 answers
120k views

Apache 2.4 + PHP-FPM + ProxyPassMatch

I recently installed Apache 2.4 on my local machine, together with PHP 5.4.8 using PHP-FPM. Everything went quite smoothly (after a while...) but there is still a strange error: I configured Apache ...
apfelbox's user avatar
  • 465
35 votes
4 answers
260k views

How to generate .key and .crt file from JKS file for httpd apache server

I have the mycert.jks file only. Now i need to extract and generate .key and .crt file and use it in apache httpd server. SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt ...
Sohan's user avatar
  • 799
32 votes
4 answers
123k views

Switch from PHP 7.2 to 7.1 on Ubuntu 16.04, Apache

I need to downgrade PHP on one of my VMs from 7.2 to 7.1 on Ubuntu 16.0.4. The last time I tried to remove just PHP and replace it with a different version, I had all kinds of issues with Apache and ...
Pegues's user avatar
  • 901
32 votes
5 answers
148k views

How do I require an IP range instead of 1 IP?

My IP changes do a different D class, so I want to set a range: 123.123.123.xxx where the last segment can be 0-255. Right now, Apache says: <RequireAny> Require ip 127.0.0.1 Require ip ...
user281497's user avatar
32 votes
5 answers
96k views

What is the meaning of "AH00485: scoreboard is full, not at MaxRequestWorkers"?

My Environment CentOS 6.4 X86_64 Apache 2.4.4 PHP 5.4.16 (FPM) 2 Intel Xeon E5-2620 @ 2.00GHz (8 core, 16 threads in each processor) 48GB RAM registered memory. 3 Hard Disk 15RPM 145GB in RAID0 (by ...
Jose Nobile's user avatar
30 votes
5 answers
84k views

How can I install Apache with a specific version?

Because of Ubuntu updating, I made the mistake to upgrade Apache 2.2 to 2.4—many things went wrong. I have no idea how to specify the version after apt-get remove apache2. apt-get install apache2 ...
Mithril's user avatar
  • 513
26 votes
6 answers
76k views

How can I list the current Apache 2 virtual hosts from the command line?

I want to to retrieve a list of the virtual hosts which are currently loaded and listening for requests i.e not just grepping the config files. It looks like apache2ctl -S does this but I am not 100% ...
codecowboy's user avatar
  • 1,367
26 votes
7 answers
67k views

421 Misdirected Request

I occasionally get the following 421 error: Misdirected Request The client needs a new connection for this request as the requested host name does not match the Server Name Indication (SNI) ...
mseifert's user avatar
  • 439
26 votes
4 answers
88k views

Certbot letsencrypt on different port than 443

I want to set up certbot for a webserver on a different port than 443. I got the following error when running certbot --apache -d <sub>.<domain>.<ext> Failed authorization ...
CaptainJack's user avatar
24 votes
1 answer
72k views

Confused about -DFOREGROUND with Apache

So I just installed Apache on a new CentOS 7 server, using Yum. I've installed Apache many times before, but never have I seen this: When I run ps aux now, it always shows /usr/sbin/httpd -DFOREGROUND ...
Cocorico's user avatar
  • 343
22 votes
6 answers
4k views

Why is response time exploding when request frequency drops?

Correction: response time (%D) is μs not ms! 1 This doesn't change anything about the weirdness of this pattern but it means that it is practically way less devastating. Why is response time ...
Raffael's user avatar
  • 689
21 votes
5 answers
42k views

Apache 2.4 proxy_balancer and lbmethod_byrequest

I'm trying to build my Apache server with static modules. But run into some problems with the proxy_balancer module. I get an error: [ssl:info] [pid 11863] AH01876: mod_ssl/2.4.10 compiled against ...
Thomas K's user avatar
  • 281
20 votes
2 answers
18k views

ufw deny from ip doesn't seem to be working

I've been tailing my server's access log while working today, and have noticed one of my client's wordpress sites getting hammered with login attempts from an IP from out of the country. I wanted to ...
rmmoul's user avatar
  • 315
19 votes
2 answers
8k views

Break up a long line in a .htaccess file

I am setting a Content-Security-Policy header in my .htaccess file, and it has grown to be an extremely long single line, which is a bother to manage. Is there some way to break up this line into more ...
MaxPRafferty's user avatar
19 votes
2 answers
39k views

What is the use of ProxyPassReverse Directive

Definition from apache.org says: This directive lets Apache httpd adjust the URL in the Location, Content-Location and URI headers on HTTP redirect responses. This is essential when Apache httpd is ...
SnowmanOnFire's user avatar
18 votes
2 answers
68k views

How To Tune Apache on Ubuntu 14.04 Server

Currently on my Apache 2 (Apache 2.4.7 to be exact) on Ubuntu 14.04, I have this setting: /etc/apache2/mods-enabled/mpm_prefork.conf <IfModule mpm_prefork_module> StartServers ...
ServerChecker's user avatar
18 votes
2 answers
48k views

How can I add in apache referrer policy header?

I'm not sure how can I add referrer policy header to my virtual host configuration file. Let's say that I want to add something like this Referrer-Header: same-origin, should it be in this way: ...
tigun's user avatar
  • 183
17 votes
1 answer
46k views

Configuring Apache 2.4 mod_proxy_wstunnel for Socket.IO 1.0

I'm trying to configure Apache 2.4 for proxying the websocket connection for socket.io to a node.js websocket server, using mod_proxy_wstunnel. We had this working fine with socket.io 0.9, but with ...
Twipped's user avatar
  • 653
17 votes
3 answers
28k views

Is it possible to replace content on every page passed through a proxy similar to how mod_rewrite is used for URLs?

Is it possible to replace content on every page passed through a proxy similar to how mod_rewrite is used for URLs? The documentation on substitute is not clear. I have some pages I am reverse ...
ZZ9's user avatar
  • 918
16 votes
4 answers
24k views

SELinux preventing Apache from writing to a file

SELinux is preventing the apache user from writing to a log file which it owns. When I do setenforce 0 it works. Otherwise it shows this error IOError: [Errno 13] Permission denied: '/var/www/webapp/...
Clodoaldo's user avatar
  • 435
16 votes
5 answers
28k views

Let's Encrypt SSL Certificate File Not Found Error, but still working

I'm running SSL Certificates from Let's Encrypt. I've got them installed on my Ubuntu machine running Apache. The setup works fine and I can launch the website, see the green padlock and even got an A+...
jarvis's user avatar
  • 2,006
16 votes
3 answers
66k views

Apache 2.4 restrict URL to certain IPs

I am trying to restrict a specific URL to be available outside the network only to specific IP addresses. When a user outside tries to access that URL and not from the list of IPs he should be ...
Denis Rendler's user avatar
16 votes
2 answers
31k views

switch apache from prefork to event in Ubuntu 16, get php 7 working

Apache was running slow in production. After searching for answers for some time, I finally went to #apache IRC channel and the pros had me check the apache mode with this command: sudo apachectl -V ...
S. Imp's user avatar
  • 585
16 votes
3 answers
20k views

apache2.4 mod_rewrite exclude specific alias directroy/uri

I have the following setup on one of my vhosts: ...<VirtualHost *:80> ServerName cloud.domain.de ServerAdmin [email protected] ServerSignature Off Alias "/.well-known/acme-...
FleBeling's user avatar
  • 163
16 votes
1 answer
14k views

Why is logrotate causing Apache to seg fault each time?

Every time logrotate runs Apache/2.4.7 (Ubuntu) experiences a seg fault and does not restart: [Wed Sep 10 06:35:54.266018 2014] [mpm_event:notice] [pid 20599:tid 140630283466624] AH00493: SIGUSR1 ...
fpghost's user avatar
  • 703
15 votes
3 answers
18k views

Is it possible to set an SSLProtocol in Apache for a single VirtualHost (poodle)?

I'm trying to test a patch for the poodle vulnerability that involves disabling SSLv3 on my web server. In order to test this on a non-production environment first, I'm setting the SSLProtocol on a ...
Cory's user avatar
  • 399
15 votes
2 answers
8k views

SSL not working with Apache on Windows

I are using a product from a vendor that has to use Apache on Windows. We have our own CA. For naming purposes: AppServer - Server2012r2 - Apache 2.4 OldCertsha1 - Server2012r2 NewCertsha2 - ...
Anthony Fornito's user avatar
15 votes
3 answers
24k views

SSLCertificateChainFile Deprecation Warning on Apache 2.4.8+

We have an SSL Certificate for our website from Network Solutions. After upgrading Apache/OpenSSL to version 2.4.9, I now get the following warning when starting HTTPD: AH02559: The ...
DOOManiac's user avatar
  • 811
14 votes
3 answers
10k views

Apache's PidFile directory is removed every boot

Every time the server is rebooted, the directory /run/httpd is removed. /run is a tmpfs filesystem, therefore, mounted in RAM. /run/httpd is created only during installation. When I start httpd after ...
João Olavo Vasconcelos's user avatar
14 votes
1 answer
51k views

Refused to frame '' because it violates the following Content Security Policy directive: "frame-src *"

I have found many solutions to various situations with "refused to xyz" due to Content-Security-Policy Settings. However I can't seem to find what might be wrong if '' gets refused. The literal ...
Worp's user avatar
  • 327
13 votes
7 answers
192k views

Serving port 443 over http creates 400 Bad Request Error instead of redirect

So for posterity sake, I am trying to configure my server so that even when someone tries to go to go to http:// domain.com:443, they would be correctly redirected to the https version of the site (...
Bitz's user avatar
  • 233
13 votes
2 answers
30k views

Why is enabling the rewrite log in .htaccess not working?

I want to enable rewrite logging so that I can debug a rewrite rule but adding the RewriteLog directives is causing a 500 error. Version information: Ubuntu 14.04 Server version: Apache/2.4.12 (...
codecowboy's user avatar
  • 1,367
13 votes
1 answer
22k views

How to stop nginx 301 auto redirect when trailing slash is not in URI?

Every time I try foobar.com/test in browser, nginx seems to redirect (301) the client to foobar.com/test/. This behaviour is unacceptable. The proxied server is a remote Apache web server. I have ...
Geo C.'s user avatar
  • 233
13 votes
3 answers
33k views

How to `Graceful Restart Apache` in centos 7?

My system is centos 7.4, with apache 2.4 Based on apache manual,apachectl -k graceful should be the way to graceful restart apache, but I got notice as below: [root@localhost root]# apachectl -k ...
kittygirl's user avatar
  • 985
13 votes
3 answers
9k views

Why do I grant access to /usr/share in apache2.conf

I have noticed that I have the following lines in apache2.conf (on ubuntu 14.04): <Directory /usr/share> AllowOverride None Require all granted </Directory> And the ...
Salvador Dali's user avatar
13 votes
1 answer
30k views

Add a custom header to ProxyPass requests

I have a simple apache vhost: <VirtualHost *:80> ServerName hello.local ProxyPass / http://localhost:8810/ ProxyPassReverse / http://localhost:8810/ </VirtualHost> All request to ...
Simon's user avatar
  • 646
12 votes
3 answers
9k views

Difference between "Redirect permanent" vs. mod_rewrite RewriteRule

This is an Apache httpd 2.2 server. We require that access to this webserver be encrypted by HTTPS. When web clients visit my site at http://www.example.org/$foo (port 80), I want to redirect their ...
Stefan Lasiewski's user avatar
12 votes
3 answers
80k views

Allow access to Apache server from only one IP address

I have an Apache server that, for the time being, I need to block access to for all but a select group of people. The easiest way to do this, I thought, would be to deny access from all traffic and ...
BSnapZ's user avatar
  • 223
12 votes
5 answers
49k views

I'm getting error: SSL3_GET_RECORD:decryption failed or bad record mac

I have my own server (where I'm running Apache/2.4.27), and today I realized that from (Brave and Google Chrome - different computers) I'm getting from my websites this error; This site can’t provide ...
user134969's user avatar
12 votes
1 answer
11k views

How to disable HSTS header in Apache 2.4? [closed]

I've set up a Vagrant box with Ubuntu 18.04 and installed Apache 2.4.29. I've created and enabled a new conf file that looks like this: <VirtualHost *:80> ServerName django.dev ...
simon's user avatar
  • 231
12 votes
5 answers
41k views

Virtualhost not working on different port

I'm trying to host my website on single server running centos7.1. I'm able to virtualhost on port 80 but when I change port of second-site to 8080 it points to first-site. However, for URL http://62....
Tall boY's user avatar
  • 221
12 votes
3 answers
43k views

Why is Apache spawning so many processes?

I have a Wordpress blog with one post. I wanted to self-host for the experience and "fun" of it. I rarely get any viewers at all because I am just setting up. I am on an Amazon EC2-micro Arch-Linux ...
Mike Flynn's user avatar
12 votes
5 answers
57k views

Apache2 "Require all granted" doesn't work

I have a fresh install of Apache2 on Debian testing and configured a virtual host in a directory like this: <Directory "/path/to/project"> Options Indexes FollowSymLinks MultiViews ...
hairlessdev's user avatar

1
2 3 4 5
121