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
132 votes
3 answers
354k 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
100 votes
4 answers
333k 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,102
85 votes
5 answers
187k 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
182k 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
66k 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
44 votes
1 answer
227k 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
36 votes
13 answers
117k 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
36 votes
3 answers
74k 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
34 votes
4 answers
250k 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
  • 759
32 votes
4 answers
122k 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
141k 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
30 votes
5 answers
80k 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
  • 503
30 votes
5 answers
92k 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
26 votes
5 answers
62k 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,347
26 votes
4 answers
87k 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
23 votes
6 answers
58k 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
  • 409
23 votes
1 answer
69k 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
  • 333
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
41k 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
19 votes
2 answers
7k 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
18 votes
2 answers
67k 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
36k 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
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
  • 643
17 votes
2 answers
16k 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
  • 285
17 votes
3 answers
27k 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
17 votes
2 answers
45k 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
  • 173
16 votes
4 answers
23k 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
  • 433
16 votes
5 answers
25k 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
64k 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
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
15 votes
3 answers
17k 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
  • 401
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
23k 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
  • 801
15 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
  • 673
14 votes
2 answers
30k 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
  • 536
14 votes
1 answer
43k 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
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,347
13 votes
1 answer
20k 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
30k 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
  • 955
13 votes
3 answers
8k 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
29k 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
  • 636
13 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
12 votes
7 answers
181k 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
  • 223
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
5 answers
39k 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
5 answers
56k 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
12 votes
3 answers
35k views

Apache reverse proxy config with SSL for Jenkins and Sonar

I am running two services behind an Apache server: Jenkins (Port 8080) and SonarQube (Port 9000). My apache config looks like this: <VirtualHost *:80> ServerName server Redirect permanent /...
friederbluemle's user avatar
12 votes
1 answer
2k views

How can you gracefully restart Apache without disconnecting SSL connections?

We are trying to reload Apache gracefully using a command such as: apache2ctl -k graceful This works as expected for HTTP users and the Apache config is reloaded without affecting users of the ...
jones's user avatar
  • 306
11 votes
2 answers
3k views

How to serve different robots.txt for http and https on same site?

I got a small site which served by Apache (I can't put Nginx in front nor change Apache to anything), and it is set up to serve the same site both over http and https (no redirects http->https is ...
Kevin M's user avatar
  • 299
11 votes
3 answers
71k 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
  • 213

1
2 3 4 5
120