New answers tagged

0 votes

Apache httpd low performance

Apache is pretty darn efficient. Although technically should qualify my answer, it's almost certainly something else that's bogging you rather than the server itself.. probably the CGI you're running ...
0 votes

apache in docker: best practice to manage logs written to mounted volume?

I'm no expert but i'm running logrotate on host side, and it is a postrotate script which is charged of sending the right signal to apache to reopen the log file : I added this on my rotate script in /...
  • 1
0 votes
Accepted

No permission to access web site

The permissions in /home/test/ are too restricted. drwxr-x--- test test test Nobody but test is allowed to enter this directory, so Apache can't read it. /home/ is not the right place to place a ...
0 votes

Apache 2.4: ProxyPassMatch prevents mod_rewrite?

I just solved the problem: I had to change FilesMatch to: <FilesMatch .php$> SetHandler "proxy:fcgi://php:9000" Then I had to put it inside the Virtualhosts. Additionaly I had wrong ...
  • 1
1 vote

APACHE CERTBOT ERROR

Meta: I fixed your formatting and restored # which is actually a necessary part of the syntax of /etc/hosts; please click the ? icon in the edit window and read the help for 'code' (and maybe others ...
0 votes

APACHE CERTBOT ERROR

Are you trying to get a certificate from letsencrypt for www.example.com? You can't do that. It's not yours. I see you're doing a few different things. You've asked certbot for a certificate for ...
0 votes
Accepted

TLS 1.2 client ignoring "Acceptable CA" list for Apache ClientCertificateRequest

I was wrong. The acceptable CA list is being delivered to my iOS app (whether I include the SSLCADNRequestFile or not). There are two app callbacks at the start of the connection, and the DER-...
0 votes

Issues with URL length in Apache/mod_wsgi

It is not a problem in WSGI, and there is not much you can do. I have analyzed the problem. Apache uses the libapr library, and invokes the function apr_filepath_merge which at a certain point does if ...
  • 161
1 vote
Accepted

Apache mod_rewrite RewriteRule loops despite L flag

The L flag only stops the current pass through the rewrite engine, it does not stop all processing. The directives that follow are not processed immediately, but (in a directory context) the rewriting ...
  • 11.8k
0 votes

How to set Apache-accessible SELinux policy for EFS mounted user directories?

I was able to fix this by defining the context while mounting the directories. I also had to define it in my fstab configuration to ensure the definition persisted after reboot. Additionally, I needed ...
  • 101
0 votes

Kerberos with Apache not working

Chrome browser need the url to be in the local internet list: control panel->ineternet options->security->local internet->Sites. As you didn't say anything about browser, hope it could ...
  • 1
0 votes

Setup Apache Docker container to keep running after executing php shell CMD

Ok got a working solution now. First of all, the reason for: [core:warn] [pid 10] AH00111: Config variable ${APACHE_RUN_DIR} is not defined was that I used the wrong command tool to run apache in the ...
  • 135
0 votes

Cannot start Apache, config test fail: "env: apache2ctl: No such file or directory"

What solved the problem for me was running the command (Ubuntu): sudo apt install apache2 which installed the missing apache2ctl while keeping everything else untouched.
  • 1
0 votes

Getting a SQLSTATE[HY000] [2002] Connection refused in PHP Apache Docker container using mariadb, if connected via Dockerfile's CMD (PHP CLI works)

Got it for real now. The connection was refused because the environment variables were only used if the script is executed via shell, and via Docker's CMD - as I used it - no shell processing occurred....
  • 135
0 votes

Apache 2.4 list prefork directive values from command line

As an alternative to the other approaches suggested here, I find my Apache distribution has a directory /usr/share/doc/httpd-2.4.54 which contains templates and files of various settings. Among them, ...
  • 163
1 vote
Accepted

How can I locate the php script that issues outbound connections?

Restrict outgoing connection from the webserver via the system firewall: iptables -A OUTPUT -p tcp -m owner --uid-owner apache -j REJECT ip6tables -A OUTPUT -p tcp -m owner --uid-owner www-data -j ...
0 votes
Accepted

Apache 2.4 REMOTE_USER lowercase

Based on https://stackoverflow.com/a/31242711/773806 I was able to resolve this question. I first ensured that mod_perl 2 was installed in all relevant environments. I then added the following to my ...
1 vote
Accepted

Can't get Apache rewrite to work on Docker PHP-Apache container

I've actually figured it out. The problem seems to be that, when using docker, you must specify the rewrite rules within the Virtual Host context of the port you've specified. At least I've done what'...
  • 135
0 votes

Apache - Require authentication for all but one IP

Thanks to @diya the following seems to do the trick: <Directory ${VIDEO_ROOT}> Header always set Access-Control-Allow-Headers "Authorization" AllowOverride All SetEnvIF X-...
  • 599
1 vote

It looks like Apache2 fails to start

Most likely is that your php version changed in your system (applicable for Debian/Ubuntu and derivatives, in other distros some paths may vary), but not in your Apache configuration, run: php -v ...
  • 111
0 votes

`Unregistered Authentication Agent for unix-process` when I restart Apache each time?

The "real" culprit is systemctl which executes /usr/bin/systemd-tty-ask-password-agent and then invokes pkttyagent, which communicates with the policykit daemon which generates the log ...
  • 431
0 votes

PHP7.4 not running on apache2

Had a similar problem. PHP works in terminal but apache2 doens't seems to parse it. reinstalled all the application again but nothing worked. then i saw the apache2.conf file where it says ...
  • 1
1 vote

Restrict access via HTTP 0.9 and HTTP 1.0 on Apache

Here's one simple way to do it: RewriteCond %{THE_REQUEST} !HTTP/ RewriteRule .* - [R=451,L] RewriteCond %{THE_REQUEST} HTTP/1\.0 RewriteRule .* - [R=451,L] HTTP 0.9 requests are in the format GET / ...
0 votes

Apache returns with default virtualhost after a while and only for some virtualhosts

After two years of troubleshooting I've the answer, I post it for the record and because nobody in the world will suffer this pain in the future. Apache have a daily cron running logrotate (/etc/cron....
1 vote

How to manage multiple environments for an app on Ubuntu with Apache server?

PHP environnement variables are not the same as your system ones or apache ones. If you want to set an APP_ENV environment variable that could be retrieved from your PHP code using getenv("...
0 votes

htaccess, block access a url with parameters

You can block access (eg. trigger a 404 Not Found) when a specific path (/path/) is requested with any query string using mod_rewrite at the top of the root .htaccess file. For example: RewriteEngine ...
  • 11.8k
1 vote

My server is attacking other servers

Attack is relative, can they quantify what the "attack" is? Sending errant packets does not constitute an attack. The packet count and payload size is consistent. Since you own the server ...
  • 395
0 votes

htaccess syntax issue when moving script to a subfolder

RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} !(template/) RewriteRule . /index.php [L] For this to ...
  • 11.8k
0 votes

How to generate .key and .crt file from JKS file for httpd apache server

Generate crt ,key and p12 from jks. step1: cd /opt/apps/users/app/scripts step2: ./jks_to_pem.sh step3: Enter Keystore Nmae : ( jks path) /opt/apps/sha2certtools/certfiles/jks/kafkaAppIdentity.jks ...
  • 1
0 votes
Accepted

browsers (librewolf & chromium tested) won't send if modified since & if none match after receiving one 304 not modified response

I've found out, finally ! The headers need to be exactly the same & sent in the exact same order as the first time the file was sent and possibly before content-length & response code (maybe ...
  • 111

Top 50 recent answers are included