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)

The Apache HTTP Server is a popular Open Source Web server. This tag should be used for general questions about Apache HTTPd.

Although there is large degree of commonality between the different versions in the 2.x branches, please consider using the Apache-2.2 or Apache-2.4 tags instead for more specific Apache HTTP Server related questions.

Documentation for all major versions is both comprehensive and has a high degree of accuracy.


1741 questions
0
votes
0 answers

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.high_risk_country_codes = AD AE AF AG AI AL AM AO AQ…
BradG
  • 101
  • 2
0
votes
0 answers

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 (From…
user193130
  • 111
  • 5
0
votes
1 answer

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 body in the JSON log ?
Jean
  • 123
  • 8
0
votes
1 answer

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: with permissions 640 for files and 750 for directories. So the…
Anton
  • 3
  • 1
0
votes
1 answer

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 address 10.x.x.2. My problem is that I have to…
0
votes
0 answers

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:
BradG
  • 101
  • 2
0
votes
1 answer

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 I tried to increase the limit, both on Apache2…
Jean
  • 123
  • 8
0
votes
0 answers

Apache Custom Error Log Entry

I have a rule in my Apache config like this: Order deny,allow Deny from all ErrorDocument 403 "Custom Response" In the error log it will always add an entry like: [Fri Apr 14 09:46:10.706192 2023]…
0
votes
0 answers

Set up a reverse proxy for local domains

My web server (apache2) is accessible on my LAN with its host name, let's say, jarvis (url: http://jarvis/). I have a Gitea instance running in my local network which is accessible via http://jarvis:3000. It obviously runs on the same machine as the…
tai
  • 111
  • 4
0
votes
0 answers

Apache proxy "404 page not found"

I am trying to create a proxy on my Apache2 server, but it returns a 404 page not found Basically I am using it as an intermediary for the creation of an API, within my Linux server I make requests and it responds correctly, but already using the…
0
votes
1 answer

Postfix to gmail relay - preserving the sender's address

Relayed emails come 'from' me@gmail.com, not sender@theirdomain.com, so I cannot reply. I have several domains and am using Postfix to relay emails sent to me@mydomains.com on to me@gmail.com as outlined in Your own mail server with Postfix…
0
votes
0 answers

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. ProxyPass http://example.com/ ProxyPassReverse http://example.com/ On the domain.com side, I have an…
Félix
  • 1
0
votes
0 answers

Php and shell_exec are a good way to process many detached process on a CentOs server?

During execution of a php webservice, i need to detach a "time consuming function" to maintain a quick response to the user. That's an example of the flow : I know that php does not manage multi-thread operation by itself, but anyway there are some…
user31929
  • 101
0
votes
0 answers

Azure VM and Multiple Apache Instances

I am doing some experiments and trying to setup multiple websites on 1 host without it being obvious that the websites are related. I want them to have their own IP address and names. I have added an IP Alias to the interface in the Azure console,…
Loki
  • 1
  • 1
0
votes
1 answer

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 thats stored in folder /var/ww/html/example HTTP conf…
Johnczek
  • 101
  • 2