All Questions
Tagged with apache-2.4 apache2
240
questions
0
votes
2
answers
78
views
Apache Httpd: Logging Access for Non-privileged Users
I’m wondering if it is common for Apache HTTPD admins to allow read access or read access to copies of /var/log/httpd/${vhost}_error_log?
I administer an Apache web server for a University CS ...
0
votes
0
answers
64
views
SVN only fails to commit new files that have been svn:copied with RA layer request failed error, changes and additions work fine
Whenever I try to commit a new file that has been created using svn:copy I get the following error:
RA layer request failed
Commit failed (details follow):
Unexpected HTTP status 502 'Bad Gateway' on
'...
0
votes
0
answers
155
views
Apache URL rewrite to hide port numbers of web servers
I have an Ubuntu server running Gitea and Jenkins on ports 3000 and 4000 respectively. I want to be able to access them through a user friendly url like http://myhost/gitea and http://myhost/jenkins.
...
0
votes
1
answer
114
views
Apache child processes are launched more than ServerLimit and threads are executed more than ThreadsPerChild
The following version of Apache is used. (MPM : event)
httpd -V
Server version: Apache/2.4.37 (Red Hat Enterprise Linux)
Server built: Jun 15 2022 08:27:14
Server's Module Magic Number: xxxxxxxx:xx
...
0
votes
1
answer
129
views
Change the script path in an Apache proxy handler
I'm developing my application with 2 containers: apache and php-fpm.
Apache serves requests, and delegates PHP execution to the php-fpm container in its vhost:
<FilesMatch .php$>
...
0
votes
0
answers
367
views
Modsecurity block access from all countries except from a specific IP or specific remote host
I have the below 3 rules in modsecurity.
Rule 1: Block all countries defined as high risk except US:
SecAction \
"id:900600,\
phase:1,\
nolog,\
pass,\
t:none,\
setvar:'tx....
0
votes
0
answers
25
views
Reordering Apache Output Filters
Is there a way to reorder the output filters for Apache 2.4? I am forced to use something like this because DEFLATE runs before SUBSTITUTE:
AddOutputFilterByType INFLATE;SUBSTITUTE;DEFLATE text/html
(...
0
votes
0
answers
28
views
Restrict location to just one IP in vhosts not working
I am trying to restrict the access to a specific location for just one IP address in the vhosts file but for some reason it is not working. This for apache 2.4.29.
Here is my vhosts file:
<IfModule ...
0
votes
0
answers
31
views
Apache Custom Error Log Entry
I have a rule in my Apache config like this:
<FilesMatch "xyz">
Order deny,allow
Deny from all
ErrorDocument 403 "Custom Response"
</FilesMatch>
In the error log it ...
2
votes
1
answer
68
views
apache2.4 (debian11): access of /.htm or /.html sites lead to 403 (and not 404)
If I install apache2 on debian 11 and access one of the following urls:
http://localhost/.htm
http://localhost/.html
I don't get the expected HTTP status-code 404, I get a HTTP-status code 403 instead!...
0
votes
0
answers
157
views
reverse proxy between apache
I need to set up a reverse proxy between two Apaches. My setup looks like the following, but it's not working.
<Location "/example/">
ProxyPass http://example.com/
ProxyPassReverse ...
0
votes
1
answer
275
views
Prevent Apache from showing first virtual host if domain does not exist?
Not sure when but WHM/cPanel and/or Apache have changed how they handle requests for domains that do not exist.
Previously it would redirect to http://requested-domain.tld/cgi-sys/defaultwebpage.cgi ...
0
votes
0
answers
1k
views
Apache Getting Killed By OOM
I Have apache2 running on Ubuntu 22. My Apache2 often getting killed by OOM. I have tried to get log and its showing something like this
> root@localhost:~# dmesg -e | grep -i kill [Mar15 03:00] ...
0
votes
0
answers
62
views
Use ProxyPass only when upstream available in Apache
hope this question is not too silly.
In Apache I'm using ProxyPass:
<Location />
ProxyPass http://localhost:3000/
</Location>
However I cannot be sure the http://localhost:3000/ will be ...
0
votes
1
answer
554
views
How to disable ssl_request log on Apache?
Our internal Apache instance on a Windows server is regularly filling up the disk with C:\Apache24\logs\ssl_request.log.yyyy-MM-dd.log logs.
They seem to be rotated, although their sizes vary (200 - ...
0
votes
0
answers
96
views
Apache2 SSL certificate error when other website site is enabled , server not picking up the right certification or configuration
I have 2 SSL configuration files for 2 sites. Both SSL are covering www and non-www versions of the sites.
The first SSL one works for SiteA. As soon as I enabled Site B, it looks like my server uses ...
0
votes
0
answers
200
views
apache2 suddenly failing to serve https
apache2 v.2.41 on Ubuntu 20.04.5 LTS (WSL2) is suddenly not connecting over https, in browser or via wget.
It's been working for months, and I haven't changed anything.
I tried restarting Apache; it's ...
0
votes
0
answers
53
views
Get Apache2 to also use no port for self-referencing URLs when Host header has no port
I need to install a reverse proxy in front of an Apache2 installation on a customer's server. The job of that reverse proxy is to proxy some additional applications (internally running on other ports) ...
0
votes
1
answer
1k
views
Apache virtualhost port 443 serves content from port 80 configuration
I'm running Apache 2.4.52 on Ubuntu Server 22.04.
I'm trying to run https through port 443, eventually aiming to have a redirect from port 80 to force content on https. However, Apache seems to be ...
0
votes
3
answers
214
views
How Can I add Cookie value or Session ID Value in ErrorLogFormat of Apache?
I want to add the 'my_session' cookie value in the Apache error log.
I have added an access log 'LogFormat' as below:
<IfModule mod_ssl.c>
<VirtualHost *:443>
LogFormat "...
0
votes
1
answer
225
views
Apache2 how to generate random string for subdomain
I want to issue a redirect to a new randomly generated subdomain name for every request I get. Below you can find my vhost configuration. I want to do a redirect towards a subdomain containing some ...
0
votes
2
answers
890
views
I get directory listing instead of the website index.php
Ubuntu 20.04, Apache 2.4, PHP5.6
I have website with the following vhost config
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName website.com
ServerAlias www.website....
0
votes
1
answer
216
views
Apache2 non-default root directory multiple websites 403 forbidden
I have Ubuntu 20.04 servers on AWS in autoscaling group with EFS mounted at /mnt/efs/fs1
I use codedeploy for deployment of a non-default website. The bitbucket pipeline creates a zip file containing ...
0
votes
0
answers
1k
views
How to use environment variable in apache config condition?
In my apache config file I'm trying to set a virtual host on port 443 IF my environment variable is not dev
I have a docker container running via docker-compose which specifies the environment ...
1
vote
0
answers
146
views
Set Apache to Block HTTPS Requests to a Certain Subdomain
I have these domains
domain.com
www.domain.com
srv.domain.com
pointing to the same server IP, but want my website to be accessible only via domain.com and www.domain.com which have SSL certificates. ...
2
votes
1
answer
184
views
How can Apache log whether requests are using HTTP2 or not, in a manner that can't be easily spoofed by the client?
According to this, including %H in your LogFormat is supposed to log the HTTP protocol version, however, it appears to be unreliable.
As an example, one can telnet to port 80 of the web server and ...
1
vote
0
answers
118
views
Enable Brotli for Apache on Google Cloud Compute Engine website
I installed and enabled the Brotli module just fine through SSH. Then, I added this to my port 80 VirtualHost config:
<IfModule mod_brotli.c>
SetOutputFilter BROTLI_COMPRESS
...
0
votes
1
answer
784
views
modsecurity wont start with an apache server
I have a Debian server where apache2 is running. I want to use modsecurity for throttling.
apache2 info
$ apache2ctl -v
Server version: Apache/2.4.29 (Debian)
Server built: 2018-01-14T11:01:58
I ...
1
vote
1
answer
356
views
Apache 2.4 - allow access from same IP and from curl Request
I want to provide access to requests from the same server that apache is running on and to curl requests, but this section does not work, neither the first nor the second match. What am I doing wrong?
...
0
votes
0
answers
185
views
Apache2 not working with PHP
I have Apache2 running on a Debian 11 box (x64). It was installed with an Openmediavault ISO, with nginx and PHP 7.4 installed already (for the web UI) I try to install the PHP connector for apache2 (...
1
vote
1
answer
690
views
How to serve static images from /tmp in Apache
How do you serve images from Apache that exist outside the document root?
I have a devops process that runs builds for a UI testing build, which generates screenshots and stores them to /tmp/images.
...
1
vote
1
answer
254
views
Requests with lager than 1GB data fail after upgrading to Apache 2.4.54
Sending requests with larger than 1GB data always fail after upgrading to Apache 2.4.54.
In Apache 2.4.53 and older versions, the LimitRequestBody limit was set to unlimited. It seems that this has ...
0
votes
1
answer
48
views
Can apache return multipe ErrorDocuments for the same response code depending on a header value?
So let's say I have a 403 page but if the request header has a custom value in it - I want to return a different 403 with a bit more information in.
So the normal 403 location may be /error_403 and ...
0
votes
0
answers
53
views
Apache mod_status, full machne readable details
Apache's mod_status (i.e /server-status) outputs HTML, including what HTTP clients are accessing what thing right now. There is a text format (/server-status?auto), but that doesn't include the ...
0
votes
1
answer
216
views
Apache 2 basic reverse proxy config not working, getting 404 error
I started a new server in a virtual machine, and I can access its homepage from the browser. I set up a docker container hosted on port 90 which I can also access. To link /app/ to localhost:90 I ...
0
votes
1
answer
19
views
Which files/directories are needed when replicating Apache installation on CentOS?
I'm replicating an Apache installation to a new server in a different data centre.
I installed the same version of Apache on the new server and would like to copy all the relevant files from the old ...
1
vote
1
answer
1k
views
No space left on device: AH00023: Couldn't create the ssl-cache mutex
I saw another similar questions here but none had a answer that solved this problem.
From time to time, around 3am, my Apache server freezes and i see those errors in my logs...
(28) No space left on ...
0
votes
1
answer
818
views
Apache virtual host serving incorrect index.html file for one of two domains connected to server
I have two domains setup on a single server using Apache Virtual Hosts. The first domain (domainA.com) is loading the index.html file of the second domain (domainB.com), even though the first domain (...
0
votes
1
answer
386
views
Apache2: How to Proxy the same url with different ports?
we have multiple different /apex instances.
now we want to proxy the requests trough an Apache2-Server like this:
request for instance1: http://proxy:8080/apex -> http://apex1:8080
request for ...
0
votes
1
answer
654
views
Request exceeded the limit of 10internal redirects on cPanel Server
I just created a subdomain called virtual from cPanel and its return 500 error. When I check the error_log I see below error:
AH00124: Request exceeded the limit of 10internal redirects due to
...
0
votes
1
answer
117
views
Why does Apache2 not respect Last-Modified headers?
On a I have:
ProxyPass /public !
in order to have content under this path served as static files directly from the file system.
But it seems that the If-Modified-Since and If-None-Match ...
0
votes
1
answer
1k
views
Apache VirtualHosts not working/redirecting? (Reverse proxy)
I am trying to set up Apache as a reverse proxy on a new Ubuntu 22.04 virtual machine. We have an existing Apache reverse proxy on Ubuntu 18.04 where everything is working as intended. This new ...
1
vote
1
answer
397
views
Find the script an Apache process is running
I have Apache 2.4 configured as mpm_prefork on an Ubuntu server.
It happens that via htop I have seen that there are processes that use a lot of CPU.
How do I find out exactly what url/php script this ...
1
vote
0
answers
88
views
ModSecurity: Block all IPs except for a list of defined IPs
I have an apache server with ModSecurity. I need to block all IPs except for a few ones.
The list of IPs is like this:
194.83.128.0/21
191.143.32.0/19
145.126.72.0/21
101.28.248.0/22
40.64.64.0/22
180....
3
votes
1
answer
167
views
Why is apache -X stuck in a pselec6() NULL loop?
version 2.4
pselect6(0, NULL, NULL, NULL, {tv_sec=0, tv_nsec=100000000}, NULL) = 0 (Timeout)
Repeats forever using strace. Only one httpd process enabled.
1
vote
1
answer
49
views
Reduce amount of network traffic by filtering attackers in AWS
just installed a simple django web application in an AWS EC2 instance.
The instance is always on, but currently not used by anyone (it is still in development).
Recently AWS is accounting lots of ...
0
votes
1
answer
134
views
Apache2 server getting so many unusal requests again and again
I am trying to configure the WordPress and NodeJS website together and I am using an apache2 server and ubuntu(20.04) virtual machine. I configured both applications successfully on my machine but ...
0
votes
1
answer
3k
views
Apache server .htaccess set header for Content-Security-Policy causes 500 error
I am trying to add 2 headers to the .htaccess file but when the site is reloaded it gives a 500 internal server error
First header is:
Header set Content-Security-Policy: default-src https:
According ...
0
votes
0
answers
656
views
Apache VirtualHost not loading correct certificate
We are running into issues with this seemingly simple configuration on Apache 2.4. We can't seem to obtain the correct certificate while using the Virtual Host site2.net. We always get site1.net's ...
0
votes
1
answer
97
views
Why do we need Apache Access Control when we have ownership, permission and firewall
Why do we need Apache Access Control like
Require user <name or UID>
Not require user <name or UID>
Require group <name or GID>
Not require group <name or GID>
Require ip <...