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
0 votes
0 answers
17 views

Application actions based on URL

I am sorry if this question was already asked, but I do not know how to frame it differently - none of my searches found something that answers this. I am currently using Windows 11 and XAMPP, with ...
0 votes
1 answer
65 views

How can I verify if file uploads are compressed?

I need to upload big files to a server (Debian 4.19, Apache 2.4, PHP) and want to make sure that compression is applied for the transport. Data is compressed from the server to clients but I cannot ...
1 vote
1 answer
4k views

Using RewriteRule only for a specific subfolder/project

I have an application in a subfolder "subfolder" of Apache so I can use a URL such as: https://example.com/subfolder/#/v2/login instead of https://example.com/#/v2/login. I have the following in the ....
11 votes
1 answer
10k 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 ...
0 votes
0 answers
18 views

Apache Bad Request (400) and time shift in logfile

My web server utilizes Apache and Django for its web service. Occasionally, the web service produces a "Bad Request (400)" error. After reviewing the error log, I noticed that there is a 6-...
0 votes
2 answers
79 views

configuring SSL for two different applications on same server: web server and python

I want to run SSL for web server https://www.domainname.com on port 443 and python REST api server https://mgmt.domainname.com with Flask. I have configured Apache SSL and it is running on 443. I ran ...
0 votes
1 answer
4k views

PHP can't write to /tmp folder anymore after Apache update

Linux dist: Ubuntu 18.04.5 LTS Server version: Apache/2.4.29 PHP Version: 7.4.20 with PHP-FPM Recently this server did an automatic upgrade of Apache and ever since PHP can't write to /tmp breaking ...
0 votes
1 answer
39 views

Virtual Host SSL and nonSSL with Proxy

I have 1 nonSSL server and many SSL with Proxy in Apache. Configuration SSL server: <VirtualHost *:443> ServerName test.com ServerAdmin [email protected] ErrorLog ${...
1 vote
0 answers
22 views

Apache: require with satisfy, and v2.5 compatibility

I want to protect an entire server with Require valid-user, but I want to allow certain resources to be accessible without a login. For the sake of argument, say that files A, B, and C should be ...
0 votes
2 answers
58 views

Mitigation of a Slow Loris Attack (slow HTTP request DDoS)

I am being targeted by a slow loris attack for several weeks now (during the worst period of the year [black friday / cyber monday]). This is an advanced DDoS attack where I get a lot of slow HTTP ...
0 votes
0 answers
30 views

How Do You Block & Unblock Internet Sites in Apache?

How do you block all internet sites and only let some sites through in Apache Proxy? I want to block all sites except some (e.g. updatemicrosoft.com, .windowsupdate.com , google.it etc.) I have ...
0 votes
4 answers
4k views

Apache Server does not display the correct website

Hi I'm trying to learn Apache2 with a VPS. So far it's ok, but I can't find the reason for one problem that I face. I've a website setup in my /var/www/example.com folder. I created a config file for ...
2 votes
2 answers
11k views

Solving Apache "search permissions are missing on a component of the path" issue

I'm learning as I go, so patience for my n00b tech skills is appreciated in advance. I have a fresh Ubuntu 18 VPS. Fresh Apache (no apache2.conf changes). Fresh vsftpd. I added a user, added it to www-...
2 votes
1 answer
4k views

Apache 502 Error With Upstream Proxy Raising 413

We have a Python Flask API running in gunicorn being fronted by apache. ProxyPreserveHost On <Location /api/v2> ProxyPass http://127.0.0.1:8090/ disablereuse=on SetEnv proxy-sendcl </...
0 votes
0 answers
50 views

Wordpress site on localhost WAMP "This site can´t be reached this connection was reset ERR_CONNECTION_RESET"

I've been working on a WordPress site on localhost using WAMP. My site was slow and I saw that it would get faster if I unchecked the cgi Apache module. Now, none of my local WordPress sites load ...
1 vote
1 answer
4k views

Upload files slow (nginx + http2)

I'm migrating a php webapp from an apache server to an nginx. Everything works as expected except uploading files. A file of 156 MBs takes ~11s to be uploaded on current server with apache, while the ...
1 vote
0 answers
109 views

Apache Server Forward Proxy : How to redirect to a custom page?

On Apache server (Xampp) I have make a forward proxy for firewall filtering that works well, but I don't understand how to use RewriteRule to redirect a forbidden url to a custom error page. I wish to ...
0 votes
1 answer
5k views

convert nginx reverse proxy config to apache

I have the following working nginx reverse proxy config server { listen 192.168.100.7:443; server_name mysite.internal; location / { proxy_set_header X-Forwarded-For $...
0 votes
1 answer
5k views

Memory allocation failed, aborting process.

What can be the cause for this error? Here is my full log from the time that my VM crashed. The machine runs rails but the DB is on a different machine, so no special load should be on the VM itself. ...
2 votes
2 answers
5k views

apache2 wrong Main Documentroot

I have a apache2 running, setup with two vhost. One site is working fine. But the other one is redirected to a wrong directory. The configuration files are exactly the same except the server names ...
1 vote
1 answer
93 views

How to make multiple changes to REQUEST_URI at once?

I'm dealing with requests from a proprietary client, that sometimes uses back- rather than forward-slashes: GET /path\to\the\file.txt, and I'd like to straighten them all out. mod_rewrite can replace ...
0 votes
1 answer
53 views

Very low resource usage on Openlitespeed (LOMP) on Ubuntu 22.04

I have been testing a custom PHP script on LOMP (Ubuntu 22.04) running on VirtualBox (2GB/2Core). First, I tried Apache and upon benchmarking the script, it could complete 10K requests in ~36s - ab ...
2 votes
2 answers
1k views

DoS attack? Vast majority of apache workers in 'Reading Request' mode, site down last night, slow now

So I think my server might be suffering a Denial of Service attack. We got notified by pingdom (website monitoring) that our website was unavailable starting around 3AM. Early today we started ...
0 votes
1 answer
4k views

HAProxy - Multiple sites, multiple acl's

We are busy with setting up HAProxy. Almost everything is working, except setting it up without multiple sites with different acl's. What we want: Using HAProxy with multiple sites, all on the same ...
2 votes
1 answer
622 views

Apache request_uri in the scope of VirtualHost

This code works perfectly in .htaccess or directory RewriteEngine on RewriteCond %{request_uri} !^/dir/$ [NC] RewriteRule ^(.*)$ /dir/ [END] but when put into VirtualHost it causes infinite ...
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 ...
0 votes
1 answer
4k views

Correct default SSL config on apache

I have a number of virtuals hosts serving sites from apache. Each site has it's own config file and many have SSL certificates setup. 00_default.conf file <VirtualHost *:80> points to a static ...
0 votes
1 answer
19 views

Access Forbidden 403 no search permission for the directory

I installed the Apache server on Manjaro (no tag for it, Arch is the closest). It works well. I added a virtualhost and tried to set directory permissions with chmod, but no luck. I got 403 error when ...
1 vote
1 answer
4k views

Apache2 - How to serve static files on a specific folder?

I have 2 virtual hosts serving 2 different sites in my Ubuntu Server 20.04 both in port 80 and 443. I want to use the same server to serve some static files for download on a custom port, let's say ...
0 votes
1 answer
44 views

Apache + PHP with mod_php No timeout

I am actually working on Apache server 2.4 with PHP 8.2 (mod_php) & debian 11.2 Recently I sent a HTTP Request with more than 100 seconds without a timeout. This request executed a large MySQL ...
0 votes
1 answer
151 views

Use ProxyPass only if remote address is in subnet

I have a php application running with a mostly default config that lives in var/www/html/app: <VirtualHost *:443> ServerName myhost.com DocumentRoot /var/www/html <Directory "...
0 votes
2 answers
71 views

Trying to update the httpd version on AWS Linux - Yum says no update?

Im trying to upgrade the httpd version on my amazon EC2 instance because our security team asked me to do so. Can anyone advise the easiest way to upgrade the httpd module? I was told I needed to ...
1 vote
2 answers
4k views

Monitor all requests and responses originating from XAMPP's apache server

I am using Windows 10 and XAMPP to do local php development. I need to capture traffic originating from the apache server XAMPP uses but I can't figure out how. I'm using Fiddler and I can see my ...
2 votes
1 answer
40k views

Apache says "Forbidden You don't have permission to access this resource." to a specific domain

I have a server on AWS which serves a number of websites. Webmin is also installed. In Apache, when I try to create a website, say ferrari.example.com, I get the error Forbidden. You don't have ...
3 votes
1 answer
4k views

Apache Reverse Proxy with Wildfly?

I have both Apache and Wildfly installed on a Ubuntu 14.04 system. Now I'd like to make Wildfly (locally http://localhost:8080) accessible from Apache (http://webserver/wildfly). How would I have to ...
0 votes
0 answers
27 views

In what order does Apache evaluate `RedirectRule` when provided by virtual host, directory context and .htaccess?

I have several RewriteRule inside <VirtualHost>, inside the <Directory> directive which belongs to the web root of said <VirtualHost> and inside .htaccess of that directory. Question:...
0 votes
2 answers
2k views

Cannot use mod_status through "localhost"

I've enabled mod_status for my own use under Apache/2.4.6 in my Windows 10 development box: <Location /server-status> SetHandler server-status Require host localhost Require host ...
3 votes
2 answers
5k views

tell apache virtual hosts to connect to php-fpm sockets using different user/group each

I've been reading the php-fpm documentation and found out that I can give each socket its own user, group and mode, but how can I tell apache (per vhost I mean) to use x user and y group to connect to ...
0 votes
0 answers
47 views

CentOS - Apache MaxRequestWorkers issue

I've had a problem with Apache since this morning, I can no longer access the websites. I get the error: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting I'm ...
0 votes
1 answer
56 views

Get Apache to serve example.com from a directory and all subdomains *.example.com to be ProxyPass / http://localhost:8050

Running Apache 2.4.58 I need to get Apache to serve example.com from a directory and all subdomains *.example.com to be ProxyPass / http://localhost:8050 (so they can be served from another web server ...
0 votes
2 answers
65 views

IF statement based on comparison with %{REQUEST_URI} in .htaccess doesn't work

I'm trying to send a custom header for pages that start with /test-live/ The code I tried: <If "%{REQUEST_URI} =~ m#^/test-live/#"> Header always set X-Frame-Options "...
0 votes
3 answers
95 views

Apache redirect http://%{HTTP_HOST}:%{SERVER_PORT}/%{REQUEST_URI} to https://%{HTTP_HOST}%{REQUEST_URI}

I am attempting to redirect <VirtualHost *:5555> RewriteEngine On RewriteCond %{HTTPS} off RewriteCond %{SERVER_PORT} =5555 RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=...
6 votes
1 answer
21k views

Apache reverse proxy timeout in 60 seconds

I have Apache Reverse proxy server which proxies request to my internal Apache server. I am using Apache version 2.4 on Linux platform. I encountered timeout page and HTTP ERROR 504 whenever back-end ...
0 votes
2 answers
43 views

websockets apache2 not working

I'm busy with implementing websockets on our reverse proxy (apache2) we redirect our traffic to tomcat with a proxypass but it's not working we get an 403 (forbidden in our logs) apache vhost file: &...
1 vote
1 answer
4k views

Apache2 - default php7.2-fpm.conf has to be included in every virtual host?

I'm trying to move from mod_php to php-fpm using mod_proxy_fcgi. After installing the needed modules I tried following the notice I got during install: Not enabling PHP 7.2 FPM by default. To enable ...
1 vote
1 answer
4k views

HTTP compression in Apache reverse proxy?

I have an App server where Apache httpd is installed which serves the requests. We have another Proxy machine which redirects the requests to this App Server httpd using proxy pass. When I apply gzip ...
0 votes
1 answer
45 views

Weird 301-redirect to http from https only happening with CF as proxy on /wp-admin on www subdomain

I have a wordpress blog on an EC2 instance on AWS using the AMI image aws-marketplace/bitnami-wordpress-6.3.2-6-r09-linux-debian-11-x86_64-hvm-ebs-nami-7d426cb7-9522-4dd7-a56b-55dd8cc1c8d0 In ...
2 votes
4 answers
8k views

Proxy Error 502 "Error reading from remote server" Apache 2.4.18 Ubuntu with HTTPS into Docker container

I'm no expert and can't see what's the problem, but obviously this error is caused by a tiny detail it seems I can't debug. Any idea? What I have: I have multiple virtual hosts configured with Apache2 ...
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 ...
-3 votes
0 answers
53 views

https domain is not redirecting properly

My website can be referred to as example.co.uk and example.net with optional www at the front. I am trying to set up Apache 2.4 so that if anyone lands on anything it always permanently redirects to ...

1
2 3 4 5
120