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
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
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
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
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
6 votes
1 answer
4k views

My browser will not display http://[sub.]example.com

When I go to http://sub.example.com in my browser I get a "connection refused" message or an "invalid certificate" error but I don't even want to connect over https. As far as I ...
Bob's user avatar
  • 5,903
3 votes
2 answers
2k views

PCI Compliance: install Apache 2.4.17 on Ubuntu 14.04.3?

I have a VPS running Ubuntu 14.04.3. The latest Ubuntu-supported version of Apache for this release is Apache 2.4.7. But the company for which I configured the server is seeking PCI compliance, and ...
user548958's user avatar
1 vote
1 answer
2k views

Relationship of ServerName, ServerAlias, host.file and how to define them in httpd-vhosts.conf

I wonder what is the relationship of ServerName & ServerAlias with host.file. As I know ServerName sets the hostname and port that the server uses to identify itself and ServerAlias is the ...
Petri's user avatar
  • 49
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
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
4 votes
1 answer
5k views

Two separate PHP-FPM sites seem to be using the same code?

I have two websites with two codebases, yet when I change one codebase, I see the change in both. I have two checkouts of the same website. They are set up to use PHP-FPM through Apache2 with FastCGI....
Sander Marechal's user avatar
3 votes
1 answer
1k views

Can I view the resolved config Apache is using?

Is there a way to view the final "effective" config a running Apache instance is using after resolving any/all includes and the like? I'm looking at a config that has a web of includes and suspect ...
Wilco's user avatar
  • 365
2 votes
2 answers
6k views

dynmap through mod_proxy on a external webserver

My setup consist of two servers, one for hosting websites and one for doing the heavy lifting (for example Minecraft). I am using Spigot to power some plugins and one of the plugins is dynmap (which ...
Orphans's user avatar
  • 1,406
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
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
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
8 votes
3 answers
22k views

Catch-All HTTPS Vhost on Apache 2.4

Is it possible to configure a catch-all (default) HTTPS Vhost on Apache 2.4? I currently have 4 domains, and an HTTP catch all but as soon as I try to add any sort of configuration my other vhosts ...
Nicolas Bouvrette's user avatar
5 votes
1 answer
12k views

ProxyHTMLURLMap not working in apache2.4

I am using apache2.4 on ubuntu 14.04. And I have enabled mod_proxy_html.But my URL are not getting replaced by a new one. Same thing I did in apache2.2 and it was working perfectly. This is my ...
Vinay Saini's user avatar
4 votes
1 answer
2k views

How to disable AES128 in Apache?

I am using the following cipher, which I keep updating today, don't worry if there is any incompletion in it. Just help me disable AES128. SSLCipherSuite ECDHE-ECDSA-AES256-GCM-SHA384:!AES128 It is ...
user avatar
1 vote
3 answers
2k views

Prevent logging of 400 errors in Apache httpd

Somebody is sending a bunch of garbage data to port 80 on my Apache server, causing tons of 400 Bad Request errors. There's nothing I can really do about it, unfortunately, but can I at least prevent ...
chowbok's user avatar
  • 11
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
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
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
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
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
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
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
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
10 votes
1 answer
8k views

Exclusion of a protected sub-url does not work on Apache 2.4?

I try to exclude a sub-url "/shop/api" from my protected website. It worked fine on different server on Apache/2.2.15 but now not with Apache/2.4.7? It always asks for the basic authentication. Any ...
megloff's user avatar
  • 403
10 votes
3 answers
11k views

Understanding apache 2.4 mod_proxy_fcgi and RewriteRules in htaccess

We've recently switched one of our web servers to apache 2.4 and running PHP via php-fpm and mod_proxy_fcgi. Most everything works quite well, but there is one problem that I don't understand yet. One ...
Konrad Neuwirth's user avatar
9 votes
2 answers
18k views

Apache ProxyPass ignore static files

Having an issue with Apache front server connecting to a Jetty application server. I thought that ProxyPass ! in a location block was supposed to NOT pass on processing to the application server, but ...
virtualeyes's user avatar
7 votes
2 answers
19k views

HTTP/2 on CentOS 7 on Apache with PHP7

After some research I cannot find answer for: How to update Apache/httpd to newest version to use HTTP/2 protocol on my VPS. I'm using PHP7 & my server based on Apache - CentOS 7. No package ...
Damian Bartelmus's user avatar
6 votes
2 answers
4k views

random CONNECTION_RESET on apache2.4 debian 9

My server has some strange behaviour and I just cant find the cause. I've been looking everywhere. I will pay 200$ worth of bitcoin to anyone who can figure this out. The problem: When requesting ...
Manuel Otto's user avatar
5 votes
6 answers
55k views

PHP-FPM - Error 503 - Attempt to connect to Unix domain socket failed

I get on server this errors (CentOs 7): [proxy:debug] proxy_util.c(2209): [client 80.251.245.153:61902] AH00944: connecting fcgi://127.0.0.1/data/webs/dev/index.php to 127.0.0.1:8000 [proxy:debug] ...
Pavel Novák's user avatar
5 votes
5 answers
39k views

Apache doesn't log remoteIP when RemoteIPHeader X-Forwarded-For is present

I'm using Apache/2.4.27 Within the VirtualHost I'm forwarding the remote client IP header from the Loadbalancer with: RemoteIPHeader X-Forwarded-For Which is needed by the application served by ...
DaWe4444's user avatar
  • 131
5 votes
3 answers
2k views

How can I use Let's Encrypt (letsencrypt.org) as a free SSL certificate provider?

I have a few sites running with a StartSSL free certificate (CJSHayward.com, JobhuntTracker.com), and Firefox rejects StartSSL and displays an error page saying that my server is not properly ...
Christos Hayward's user avatar
5 votes
1 answer
8k views

Debugging a timeout with ldap auth on apache

I'm trying to debug a timeout problem I have with Apache, for some months now. The pattern looks like this: On every first request of a new session (or after some time after the last request) the ...
Gerald Schneider's user avatar
4 votes
2 answers
373 views

Is it possible to generate a variable for SSLCertificateFile from HTTP_HOST (or something similar)?

Normally in my vhost blocks I do: Define SITE example.com SSLCertificateFile /path/to/${SITE}.crt SSLCertificateKeyFile /path/to/${SITE}.key I'm wondering if it's possible to create a variable in ...
Jeff's user avatar
  • 1,426
3 votes
1 answer
3k views

Catch-all rewrite rule for apache that doesn't cause duplicate urls from .htaccess

You can make a catch-all rewrite rule for apache that acts somewhat like an alias, but can be implemented in a .htaccess file while an alias can't. As an example, assuming your document root is a ...
J V's user avatar
  • 173
3 votes
2 answers
3k views

Redirecting www to non-www (apache, letsencrypt )

Ubuntu 14.04 Apache 2.4.18 I have set up a SSL certificate using letsencrypt. It works well but in order to work, I cannot have multiple vhost defined in one virtualhost configuration file. Each ...
pixeline's user avatar
  • 658
2 votes
1 answer
7k views

Sendmail: DSN: Service unavailable

I've been having trouble getting my server to send email and I haven't for the life of me figured out how to fix it. If anyone could give me some simple pointers, that would be muchly appreciated! ...
abrosis's user avatar
  • 123
2 votes
3 answers
3k views

Apache 2.4 - 403 HTTP status code

I'm getting a 403 error message with Apache, in Debian Testing. Apache version: # aptitude show apache2 | grep -i version Version: 2.4.9-1 # ls -la /home/ total 28 drwxr-xr-x 4 root root ...
Thom Thom Thom's user avatar
2 votes
1 answer
2k views

SetEnvIfExpr with response header

I want to set a environment variable when a specific response header has a value. But when I make this it doesn't set the variable. Header add X-foo "bar" <If "resp('X-foo') == 'bar'"> ...
Ze Seb's user avatar
  • 23
1 vote
2 answers
5k views

Reducing Apache Memory usage and Average Process Size Value

I know that question is little long but i choosed to describe each and every aspect which i observed from my end. I am using a Linux server, OS used is Ubuntu 14.04, all rest configurations are ...
imvikasmunjal's user avatar
1 vote
1 answer
3k views

Invalid argument: AH03139: ap_queue_pop failed

Short version, I upgraded from Fedora Server 23 to Fedora Server 24, and now my apache (httpd-2.4.23-4.fc24.x86_64) error_log is filling up with these messages: [Mon Nov 28 20:30:39.486187 2016] [...
Mike Bobbitt's user avatar
1 vote
1 answer
3k views

How to allow to change php version via .htaccess in Apache?

I've a Centos 7 with Apache, I want to compile php 7.0 and 5.6 and configure that as PHP-FPM. How can I configure Apache to allow users to change php version using .htaccess? Example .htaccess entry: ...
Janek's user avatar
  • 15
1 vote
1 answer
48 views

Serving http data from two servers

I have an Ubuntu server behind a NAT router / firewall. I would like to add another server, serving content from both servers over http(s). As I understand it I can have the "main" server request data ...
user2130951's user avatar
1 vote
1 answer
409 views

Creating new users using PHP not recognized by Apache 2.4

I have a server setup where new linux users are created using (PHP) shell_exec ( '/usr/sbin/useradd ' . $username ); exec ('usermod -a -G ' . $username . ' '. $username); #add user into the usergroup ...
Kshitiz's user avatar
  • 119
0 votes
1 answer
9k views

apache redirect only root slash homepage [duplicate]

I need to redirect only http://example.org/ to http://www.something-other.org/ in Apache 2.4. Just the homepage. Nothing else. I.e. http://example.org/?page=blog or http://example.org/contact.html ...
rubo77's user avatar
  • 2,509
0 votes
1 answer
1k views

How to avoid the "Forbidden" error when changing the DocumentRoot in the default virtual host file on Ubuntu Apache?

I have Apache installed on an Ubuntu virtual machine. Typing http://localhost in the browser brings up the Apache intro site, so I know Apache works. I created the file /home/test/webs/testapp/index....
Edward Tanguay's user avatar

1
2 3 4 5