Questions tagged as ['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)
Score: 0
Log TCP Client port on apache mod_proxy
cn flag

Using an Apache 2.4 Reverse Proxy (with mod_proxy) that connects to a backend HTTP service we have the following(simplified) series of TCP connections:

client ClientIP:random_port1 ---> <IP1:443 port> reverse_proxy <IP2:random_port2> ---> <IP3:8443 port> backend svc

We also get the following error in mod_proxy suggesting that we cannot make the second connection(IP2:random_port2 ...

Score: 0
df8oe avatar
AH00690: no acceptable variant
lk flag

I randomnly see the error on different domains. I have googled and tried different solutions but none removed the problem. Now I try to reproduce the error to find a solution - but I cannot reproduce!

This is the access log and error log in case of an error:

xxx.xxx.xxx.xxx - - [25/Nov/2021:18:43:33 +0100] "GET /humans.txt HTTP/1.1" 406 - "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWeb ...

Score: 1
Apache MPM workers stuck in G (gracefully finishing) growing - "scoreboard is full"
us flag

Running MPM worker, Apache 2.4.46, Debian 9

Gracefully finishing workers just grows over time, they dont seem to ever finish. Eventually I run out of capacity and get "scoreboard is full" error. If I restart apache they get released.

I dont believe its anything to do with my website code (php) as many of the hanging requests are just pure image GETs, no php involved.

enter image description here

<IfModule mpm_worker_module>
 ...
Score: 0
Eaten by a Grue avatar
Premature end of script headers due to response header length
us flag

My question is very similar to this unanswered question: Apache 2.4 + PHP-FPM + Chromelogger (how to increase HTTP header length limit?)

Initially I was getting:

[proxy_fcgi:error] Premature end of script headers

Then after disabling the proxy:

[cgi:error] Premature end of script headers: ea-php74

I am sending debugging data in the response headers and these errors are generated any time I send res ...

Score: 0
Apache log says "404" but my ErrorDocument is ignored and browser says "The requested URL ... has moved"
kz flag

I'm trying to setup some customer error pages on our Apache servers, which seemed straightforward. The 503 is working right, but the 404 is not. They're setup the same:

<LocationMatch "/my/uri">
    ErrorDocument 503 /errorCustom.html
    ErrorDocument 404 /errorCustom.html
</LocationMatch>

But when I hit a bad URL in the site, the Apache log clearly says it triggered a 404 as expected ...

Score: 0
Soheil avatar
apache doesn't show files which have different owner
fr flag

I have created a domain in WHM for user alex. now if I put any file in public_html folder of this domain which has the owner defined as root, apache does not allow visiting of the file in browser, it says not found. but if I change the owner of file to alex, everything works fine!

now I want apache to allow visiting every file in public_html, even if the owner is root and not alex. how to do that?

 ...
Score: 0
Mort avatar
Apache: Allow Certain Users only from specified subnet
us flag

I have a requirement to change some Apache 2.4 authentication so that most users can access the website from anywhere, but certain users (who can be identified in a number of ways, but an LDAP group would be the easiest) can only be permitted access from a certain IP address subnet. (Authentication is via OIDC module plus ldap groups.)

(A simplified version of what) the current Apache config is

<Req ...
Score: 1
x43 avatar
Changing the HTML of Apache's directory listing
us flag
x43

I'd love to globally customize the HTML and CSS of the default Apache2 directory listing. How could I do this? Is there a folder with the "skeleton" of this HTML?

Score: 0
anon1 anon1 avatar
Set multiple URLs to return 410 apache
cn flag

I've already set multiple urls to give 410 redirects

Redirect 410 "/example-url"

However I have to edit multiple files to achieve this for many others URLs, is there a more elegant solution where, for example my 3x conf files can source these URLs from a single .txt file and that way reduce the clutter inside the conf files itself?

I considered LocationMatch but these urls do not match in any case and I  ...

Score: 0
datadevil avatar
Apache proxy removes double slash
lr flag

I'm trying to send requests to a docker image by using apache's proxy functionality. The request to the docker should look something like: https://127.0.0.1:8282/somepath/https://somedomain/someimage.jpg but it is being forwarded like https://127.0.0.1:8282/somepath/https:/somedomain/someimage.jpg (so missing one slash).

I think this is probably some default to prevent issues with directories acciden ...

Score: 0
Jai avatar
Unix socket communication with Apache 2.4.51 and Flask App using Uwsgi returning "404 Not Found"
io flag
Jai

I'm using Apache in the front as web server and running python flask application at the back end and they communicate using Unix socket as mentioned in the link below for mod_proxy_uwsgi module and i have loaded both mod_proxy and mod_proxy_uwsgi as suggested https://uwsgi-docs.readthedocs.io/en/latest/Apache.html

httpd/bin/apachectl -S
VirtualHost configuration:
*:2020                 host-rh7-1 ...
Score: 0
Jetto Martínez avatar
502 on redirects from http to https on GCP
fr flag

I'd like to start by saying that I know there are quite literally hundreds of topics about this, which I've followed before to get things working. Yet, this configuration, which I had working for months, its not working in a different environment.

The requirements is pretty straightforward: Take users from site on port 80 to the same site on port 443.

We have said site, with Apache as front and with ...

Score: 1
Daxorp avatar
Apache .htaccess require ip not strict enough with IPv6
tr flag

Let's suppose my IPv6 is 1111:2222:3333:4444:5555:6666:7777:8888

I can write any of these lines in the Apache .htaccess:

Require ip 1111:2222:3333:4444:0000:0000:0000:0000
Require ip 1111:2222:3333:0000::/64
Require ip 1111:2222:0000:0000::/64
Require ip 1111:2222:0000:0000:

I still can access the site. Apache seems to test only the 2 first blocks of IPv6. Did I miss something? How can I really limit to  ...

Score: 1
goldie avatar
How to deny access to all but one IP, and allow access to specific URIs for all with Apache 2.4
cz flag

I need to block access to site from public but allow one IP address in. And I need to give access to couple of URI-s for public. But nothing works - either all gets blocked or all is open.

Simplified extract from Apache conf:

<Directory /site/dir>
    Require ip 1.2.3.4
</Directory>

<Location "/open/for/public1">
    Require all granted
</Location>
<Location "/open/for/publ ...
Score: 0
manifestor avatar
Apache web server: Kill process/thread automatically that consumes too much RAM
mp flag

We're running an Apache web server (version 2.4.51 on Debian 11) which delivers a huge website with lots of scripts, all written in Perl. The problem is that no one can can really figure out how the code works and the functionality is being continuously replaced by new software written in PHP. Sometimes though the old Perl code runs into a loop, starts consuming too much RAM and the Apache web server ...

Score: 0
temperature avatar
X-Robots-Tag across Multiple URL
cn flag

I need to add X-Robots-Tag in my apache config where it can be applied to multiple URL's which are read from a file and apply the X-Robots-Tag HTTP header, is this possible ? Any pointers on how to accomplish it? Below Example shows different file types, however is it possible to read the file path from file and apply the http header?

   <Files ~ "\.(png|jpe?g|gif)$">
  Header set X-Robots-Tag "n ...
Score: 0
kaplego avatar
Apache WampServer - Getting "It works!" only with https
eg flag

I am using WampServer 3.2.3 (Apache 2.4.46) and I added an SSL certificate on a virtual host, but when I go to this virtual host's whebsite with http, it displays the configured page. The problem is that when I go with https, the website shows the default page "It works!".

I searched for "htdocs" (the path where the file is stored) in httpd.conf and httpd-vhosts.conf, but I don't have any result.

Score: 0
Akshay B avatar
How to set maintenance page when using apache2.4 as reverse proxy
cn flag

We are using ProxyPass and ProxyPassReverse to redirect traffic to our application. how can I setup a maintenance page when we are performing deployments.

Thanks

Score: 1
OpenLitespeed vs. Apache difference for WordPress?
pe flag

What is the biggest difference and concerns about OpenLitespeed (not premium Litespeed) and Apache?

About speed, security and management issues, what should newbies understand? This is not about web hosting service, I mean to install by myself? thank you

Score: 0
Does Apache's "LogLevel" Affect only Error Pages, or Access Logs too?
lc flag

My Apache access_log is only showing a handful of requests. I want to see all hits to the server in the logs. I'm confused about the "LogLevel" directive. Do the various levels (error, warn etc) apply only to the error logs, or to the raw access logs as well? Should I change "LogLevel" to "info" to see all requests?

Edit: I'm running CentOS.

Score: 0
Diogo Braga avatar
Apache not sending headers to PHP over FCGI/PHP-FPM
cn flag

I have a virtual host configured to process PHP files over Proxy:FCGI, and it works fine, except that PHP is not receiving custom headers and others, like "Origin".

Here my Apache 2.4 virtual host:

<VirtualHost *:80>
    ServerName domain.localhost
    DocumentRoot "/my/host/directory/public"

    DirectoryIndex index.html index.php

    ErrorLog "/my/host/directory/logs/error.log"
    CustomLog ...
Score: 0
actomobile avatar
Apache is not using SSLProtocol & SSLCipherSuite directive configuration
ne flag

I am trying to set up HTTPS in my web server. I got error Error code: SSL_ERROR_NO_CYPHER_OVERLAP in firefox and ERR_SSL_VERSION_OR_CIPHER_MISMATCH in chrome. I looked it up and i found that my SSL protocols or ciphers are unsupported. Test in ssllab (https://www.ssllabs.com/ssltest/) resulted inNo secure protocol supported. GeekFlare's TLS test (https://gf.dev/tls-test) says that none of TLS protocols ar ...

Score: 1
Apache ProxyPass to Shared Ip Address for Domain
pl flag

I have a case where I need to proxy pass a domain (domain1.com) to a different domain (domain2.com) hosted on a shared ip address (192.168.168.168), but domain2.com DNS is pointed other than the shared ip address, so domain2.com cannot be used as the proxy pass, only the shared ip address.

Since the shared ip address has multiple hostnames, is there a domain or hostname configuration option that  ...

Score: 0
How to debug intermittent apache 502s with no error/access log entries?
vu flag

Logs external to us show that requests to our Apache server are occasionally responded to with 502 status. However, there are no corresponding entries in the site or apache-wide access or error logs. I have verified that these files have the correct permissions and ownership and that other content is being written to them.

Our setup is that requests come into Apache and are reverse proxied to doc ...

Score: 0
Tom avatar
Apache Mod_RemoteIP Support
bf flag
Tom

I currently have an old Apache 2.4.18 server on Ubuntu 16.

Does this version of Apache support mod_remoteip?

I looked in the mod_remoteip documentation, but I haven't found about the minimal version of Apache that it is supported.

Score: 0
apparently apache retrieves index.php from non existent directory
th flag

I have a web site defined in apache2 with the conf file:

<VirtualHost *:80>
    ServerName my.site.net
    DocumentRoot /var/www/foto
    <Directory /var/www/foto>
        DirectoryIndex index.php
        Options +FollowSymLinks
        Options -Indexes
        AllowOverride None
        Require all granted
    </Directory>
</VirtualHost>

Everything is fine, but:

  • If I load
Score: 0
philolegein avatar
Apache 2.4 no auth config works in VirtualHost
cv flag

I'm setting up a brand new server — I literally just spun up an AWS EC2 instance, did a fresh install of apache and mod_ssl, and have close to the simplest of configs. Apache appears to ignore any auth configuration (including LogLevel) in VirtualHost blocks.

This is with Apache 2.4.51 on amzn2.x86_64 Linux.

I started by redirecting HTTP to HTTPS, and then followed the basic instructions for Apac ...

Score: 0
RewriteMap not working as expected
cn flag
Sam

I am trying to block access to certain url :

https://example.com/questions/topic

I have a blacklist.txt file that contains the following :

questions/topic deny

and then I have the following in the configuration :

 RewriteMap access txt:path_to_blacklist.txt
 RewriteCond ${access:%{REQUEST_URI}} deny [NC]
 RewriteRule .* - [F,L]

but I found that I still can open https://example.com/questions/topic ...

Score: 1
tmath avatar
Bitnami Apache: Rewrite HTTP to HTTPS
in flag

I'm trying to redirect all HTTP requests to HTTPS in a Bitnami LAMP environment.

At first I followed the steps here but it did not work. I also tried the answer of this question and basically everything in between.

Here is what I have currently.

bitnami.conf:

# Default Virtual Host configuration.  

# Let Apache know we're behind a SSL reverse proxy
SetEnvIf X-Forwarded-Proto https HTTPS=on

<Vir ...
Score: 0
P.Péter avatar
tomcat9 shibboleth+mod_jk authentication forbidden
in flag

I have a Spring Boot application running currently under Tomcat 8.5 that has a shibboleth-based SSO integrated. Shibboleth and tomcat are connected using apache2 mod_shib and mod_jk, using default Debian 9 packages.

I am now trying to upgrade the application's environment to Debian 10 (and thus tomcat 9), and most things work with minor configuration changes, except the Shibboleth-based authentic ...