Questions tagged [apache2]
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)
1,794
questions
0
votes
1
answer
451
views
Is there a way of rewriting wss to https Apache 2
Hi im currently trying to find a way to
switch out the protocol of a url.
Im having a server wich is running fine on its own but behind a apache reverse proxy its throwing the error connection to ...
0
votes
1
answer
260
views
Debian 11, Nagios4, and 403 forbidden
Having installed Debian's Nagios4 package I can't access it. Apache gives me this:
AH01797: client denied by server configuration: /usr/share/nagios4/htdocs
I've tried various things, such as ...
0
votes
1
answer
189
views
Ubuntu - Issue hosting (HTTPS only) a Net core app: "AH01276 - Cannot serve directory"
I'm trying to setup my application using HTTPs, I followed a guide HERE to do it properly but it's not working.
My app runs perfectly in port 80 (http) and when I turn on auto redirect for 443 (https) ...
0
votes
0
answers
684
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
1
answer
231
views
ModSecurity : How prevent the body to be displayed in the JSON output?
Using Modsecurity, I write the catched requests in a log, in a JSON format. The body field is too verbose for my ELK index, and generates a lot of parsing errors.
Can I disable the presence of the ...
1
vote
0
answers
160
views
CentOS getting unusable slow over time running at Hyper-V
I run TWiki 6.1 on a CentOS Stream 9-virtual machine hosted in Hyper-V at Windows10. VMs hostanme is "twiki"
System ran for over a year now without any problems but since some weeks its not ...
1
vote
1
answer
254
views
Permissions for static website files
The question is about best practices, not an exact problem.
What is correct ownership and permissions for static website files and directories?
I’m going to use root:<server-group> with ...
0
votes
1
answer
290
views
access a website behind openvpn client
I have an openvpn server (10.x.x.1) and a client (10.x.x.2) with a php webapp on apache.
I can access this webapp with my PC (with openvpn client installed, 10.x.x.3) over the vpn network with his ip ...
0
votes
1
answer
410
views
ModSecurity : PCRE limit settings do not have any effects
I'm facing Rule execution error - PCRE limits exceeded (-8): (null). errors when I ask ModSecurity to analyse body data (using the SecRequestBodyAccess On directive).
I've read about the problem, and ...
0
votes
1
answer
170
views
Postfix to gmail relay - preserving the sender's address
Relayed emails come 'from' [email protected], not [email protected], so I cannot reply.
I have several domains and am using Postfix to relay emails sent to [email protected] on to [email protected] as ...
2
votes
1
answer
80
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
1
answer
120
views
Apache2 subdomain not found after addition
Here is a situation
I have example.com domain pointed to my server where Apache2 runs.
Currently I have two confs (one for HTTP and one for HTTPS) that accepts example.com requests and shows page ...
3
votes
1
answer
961
views
Why are tmp files in /var/tmp/systemd-private-* excluded from automatic deletion?
I'm running a CGI application on an Apache instance, and lately I've been noticing errors like the following, which appear to be causing some issues:
ERR012: Unable to create temporary file "/var/...
0
votes
1
answer
189
views
Apache2 mod_substitute not modifying URLs
I'm trying to use Apache2 as a reverse proxy to access an application (calibre web) running inside a Docker container. Since the application is using redirects (more details here), I'm trying to use ...
0
votes
1
answer
261
views
Apache vHosts - Two domains, multiple subdomains and defaults possible?
after searching and try-and-erroring for a while I came to the conclusion that my problem is a bit too special for google :-)
I have 2 domains and multiple subs
example.org
cloud.example.org
wiki....
14
votes
1
answer
4k
views
Why does my Let's Encrypt certificate contain references to Cloudflare?
I own a website that uses a Let's Encrypt certificate. It's not behind Cloudflare, it's hosted at OVH and I'm accepting direct traffic from it.
Now, I set up an apache2 webserver and used certbot to ...
1
vote
1
answer
522
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 ...
1
vote
0
answers
3k
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
1k
views
Apache 2.4.52 HTTPS Rewrite no longer works on Ubuntu 22.04
I have been forcing HTTPS upgrade through mod_rewrite for years on Ubuntu 18.04 LTS servers. I recently upgraded a few of these servers to Ubuntu 22.04.1 LTS to ensure the latest security and Apache ...
0
votes
0
answers
336
views
How to forward https traffic from Port 80 to Port 8501 on Ubuntu Apache2?
So I used iptables to redirect traffic from 80 to 8501 as follows:
sudo iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 8501
However this doesn't work with https. I was ...
0
votes
1
answer
176
views
Syntax Error I can't figure out on Apache2
I was attempting to change the conf of my files in order to achieve port forwarding, however all of a sudden I get the following error when attempting to restart:
AH00526: Syntax error on line 30 of /...
0
votes
0
answers
628
views
AmazonLinux 2022 Fails to Run PHP Scripts - Error AH02454
I am attempting to run basic PHP scripts on an Amazon Linux 2022 or Amazon Linux 2023 server instance. I followed the directions here and when I request index.html it serves a static page fine. ...
0
votes
0
answers
269
views
AWS poor performance compared to DigitalOcean's
Why is my Apache2 server with PHP-FPM experiencing significantly lower performance on AWS EC2 instances compared to DigitalOcean Droplets? Despite similar hardware specifications and configurations, ...
0
votes
0
answers
337
views
Proxy apache2 to container gives 404 error
I am new to apache2 I've followed every tutorial on the internet, I think I've seen every question but it didnt help. The problem is that
My container contains flask app.
Container listens to 45654 ...
0
votes
1
answer
504
views
Getting 404 on a specific path /pricing with Apache server
I've set up an Apache server on Ubuntu 20.04
The site loads fine when I load the home page first (https://leadzilla.ai) and after that when I click on the pricing button and it takes me to https://...
0
votes
2
answers
645
views
nmap vuln script detects vulnerability "Apache byterange filter DoS http-vuln-cve2011-3192" in Ubuntu Webserver, but apache2 not installed on server
I am running an Ubuntu 20.04 LEMP (Linux, Nginx, MariaDb, PHP) webserver. I am also doing some nmap vulnerability tests form my MacOS Client machine. On MacOS, I am using Oh My Zsh! with the nmap ...
0
votes
0
answers
812
views
Apache on OSX: "not running" and "already in use" for all processes?
OS: macOS Mojave 10.14.6
HTTP Server: Apache 2.4.55
When trying to restart apache server, I get "Address already in use..." message. Hm, so there must be a process that listens to that port, ...
1
vote
2
answers
646
views
Subdomain redirection (proxy) not working (tried with Apache2 and Nginx)
I'm using a raspberry pi with apache2 to manage my websites. I have multiple docker images running on different ports. I want to redirect (without url changes) scanner.raspberry.local to localhost:...
1
vote
0
answers
553
views
Apache reverse proxy websockets correct way
<Client A> <---> <Server A: reverse proxy> <----> <Server B>
I don't want the Client A to connect to Server B directly, well it shouldn't that's why I'm using a reverse ...
1
vote
0
answers
93
views
Apache2: mod_ratelimit only allowing half the speed
I'm trying to limit the file download speed in a directory
I've got the following .htaccess
<IfModule ratelimit_module>
SetOutputFilter RATE_LIMIT
SetEnv rate-limit 4096
</IfModule>...
0
votes
1
answer
80
views
Apache2 VHOST matches wrong server name
I'm running Apache 2.4.54 on Debian Bullseye and have 42 VHOSTs configured. Most of them are subdomains xxx.my.domain.com of our main domain, say my.domain.com. One client has a special domain. There ...
0
votes
1
answer
922
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
316
views
Apache2 http server and Openvpn server on the same machine
Installed Apache2 server on my Linux Mint 20.3 Cinnamon and I could easily reach my http pages from web pointing to the static ip address of my router where I have configured the right http port.
I ...
0
votes
0
answers
331
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 ...
1
vote
1
answer
882
views
Redirect all URLs ending in ".-detail" to remove the dot
I have a rather odd situation where our old URLs are ending in .-detail and need changing to just -detail.
For example:
example.com/product.-detail needs changing to example.com/product-detail
In ...
2
votes
1
answer
188
views
Is it possible to install and use Dokku on a server that already has Apache2 configured with VirtualHosts running?
Posted this on StackOverflow, but realized it probably belongs here:
I have a Ubuntu (now upgrading it to 22.04) server that runs several virtual hosts with php applications. I'd like to run a couple ...
0
votes
1
answer
215
views
Apache2 Default HTTPS 443 Vhost
I'm currently trying to make a default vhost for HTTPS to block traffic from unauthorized domains. However, when I define a default 443 vhost, ALL other HTTPS vhosts inherit this as well and prevents ...
0
votes
1
answer
526
views
I to host a static website with nginx on Plesk server which is running Apache
I migrated my WordPress websites from shared hosting to a single VPS. I am hosting the websites with a Plesk server. The Plesk is configured to serve the request with an Apache web server and Nginx as ...
0
votes
0
answers
77
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) ...
2
votes
2
answers
1k
views
Is it possible to start apache2 as non-service foreground program? [closed]
apache2 normally runs a service. I don't apache2 service to run in background. I want to run it as long as it's a foreground program so I know that when I close my terminals while forgetting to stop a ...
0
votes
1
answer
2k
views
Modsecurity Rule that Would Block the IP After a Certain Amount of 403 Errors
I am trying to figure out how to write a ModSecurity rule that would block the IP from the server for a period of time when that IP is generating a certain amount of 403 errors, and I am struggling ...
0
votes
1
answer
61
views
apache proxy, protect folder, exclude file
I'm using apache as a reverse proxy and I was wondering how can I protect a folder but exclude a file within that folder.
For example if I use
<Proxy http://192.168.1.10/myfolder>
Require ip x....
0
votes
1
answer
2k
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
0
answers
162
views
apache2 reverse proxy, how to serve multiple domains with backend recognizing only 1 valid uri
I have an Apache reverse proxy set up and my backend service is configured on a specific static ServiceUri="site.com". I would like requests coming for multiple domains a.site.com/data, b....
0
votes
1
answer
110
views
Configure SSL for Apache Reverse Proxy
I want to redirect HTTPS connections to my domain towards a unique subdomain using Apache2 reverse proxy. I want all the connections that come to a.example.com to be redirected towards $random$.b....
0
votes
1
answer
1k
views
fail2ban works with access logs but not error logs "Have not found any log file" Bitnami Servers
OK I am stumped...Why is it that fail2ban works perfectly fine on my ubuntu computer but on my aws bitnami stack it won't find the error_log file. It's like it hates the fact that bitnami puts the ...
0
votes
2
answers
465
views
Does apache ProxyPass handle tls for websocket too?
I'm new to proxypass, Let's say this is our config:
<IfModule mod_ssl.c>
<VirtualHost *:443>
# The ServerName directive sets the request scheme, hostname and port that
# ...
0
votes
2
answers
547
views
Stuck on php8.1 when downgrading to php7.4
I upgraded the php version on my Apache server running on Debian (buster) from 7.3 to 8.1. Due to an older Nextcloud installation I had to downgrade to php7.4. The downgrade worked well following ...
0
votes
1
answer
74
views
How to start myslq if it fails to start due to insufficient space, and the main files eating up space are mysql binary log files
My server disk usage looks like this:
Filesystem Size Used Avail Use% Mounted on
udev 989M 0 989M 0% /dev
tmpfs 200M 21M 180M 11% /run
/dev/xda1 59G 57G ...
0
votes
2
answers
333
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 "...