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.


1650 questions
5
votes
1 answer

warning: /usr/lib/postfix/smtpd: bad command startup -- throttling

today i set up a mailserver with a german tutorial from here: Now i'm done and need help with my issues. Sry for bad english - i hope my informations help u to help me ^^ mail.log: Nov 18 16:30:00 srv01 postfix/smtpd[23275]: connect from…
user386409
5
votes
2 answers

debugging stuck apache/php thread on production server

I have a linux system with apache httpd and PHP which is loaded using LoadModule php5_module /usr/lib/apache2/modules/libphp5.so. I've enabled the mod_status module of apache and I see a particular thread which is stuck doing something since…
cherouvim
  • 744
  • 3
  • 18
  • 37
5
votes
1 answer

How to make mod_wsgi use Python 3.9?

I originally had Python 3.6 installed and working well with WSGI and Apache2 on my Linux server. Then I created a Flask app that had a dependency needing Python 3.7. I've successfully (and I think) upgraded to Python 3.9. Running python3 or sudo…
ThatCoolCoder
  • 181
  • 1
  • 6
5
votes
1 answer

Warning: DocumentRoot does not exist... But it does

I'm trying to host 3 sites with Apache in Ubuntu 20.04 but when I try connecting to them I get Not Found. The requested URL was not found on this server. This is my virtual host file ServerName nico1.com Redirect…
4
votes
1 answer

Why is $_SERVER['HTTP_HOST'] sometimes example.com and sometimes example.com:443?

This is an Ubuntu server running PHP 7 on Apache, with a website which enforces TLS (using the standard port). To my understanding, https://example.com and https://example.com:443 are exactly equivalent (and, indeed, in my browser the port number…
TRiG
  • 1,167
  • 2
  • 13
  • 30
4
votes
1 answer

AddType application/x-httpd-php .html stopped working

I have the following line in .htaccess AddType application/x-httpd-php .html .htm And it used to work for years to treat html pages as php, however recently I noticed it is not working anymore, except only in the homepage (example.com), and not…
Mike
  • 143
  • 1
  • 3
4
votes
0 answers

Adminer not working - Configuration file is missing

I have a VM running Debian 9.7.0 64-bit off a Windows 10 host machine. This VM has the packages openssh-server, ufw, mysql-server, mysql-client, adminer, and their dependencies installed via apt. Mysql and Apache both appear to be functioning - I…
SierraKomodo
  • 141
  • 1
  • 4
4
votes
1 answer

bind9 DNS server and virtualhosts apache2: getting to work multiple virtualhost like foo.myenterprise.com

My goal is to host various sites (local virtualhosts) on my apache webserver in the LAN of my enterprise (Debian 9 server). So that: openproject.myenterprise.local => /opt/openproject wiki.myenterprise.local => /var/www/location/wiki etc. I…
Philippe Gachoud
  • 1,517
  • 15
  • 20
4
votes
1 answer

RewriteCond ignored in httpd.conf

Put simply this works in htaccess: RewriteEngine on RewriteCond %{SCRIPT_FILENAME} !-f RewriteCond %{SCRIPT_FILENAME} !-d RewriteRule ^([^/]+)/?$ https://example.net?u=$1 [L,NC,R=301] But when I move it to httpd.conf it does nothing. I have…
Guesser
  • 53
  • 4
4
votes
1 answer

ExpiresByType "access plus 1 month" results in 1 year expires header

I have implemented resourec expiry with the following set up ExpiresActive On ExpiresByType image/jpg "access plus 1 year" ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/gif "access plus 1…
jdog
  • 111
  • 4
  • 28
4
votes
3 answers

Enable cross origin for subdomain

I have 2 subdomains, av.xyz.example and video.xyz.example. I want to enable CORS for video.xyz.example on av.xyz.example. I have added the following code snippet in the apache configuration file of av.xyz.com Header set Access-Control-Allow-Origin…
Rick Roy
  • 215
  • 1
  • 5
  • 15
4
votes
1 answer

Difference between keepalive in apache2.conf and in ProxyPass

I am using Apache 2.2.22 What is the difference, if there is any, between the Keepalive directive in /etc/apache2/apache2.conf # # KeepAlive: Whether or not to allow persistent connections (more than # one request per connection). Set to "Off" to…
nwtnsqrd
  • 45
  • 1
  • 1
  • 5
4
votes
1 answer

Accidentally deleted /tmp/systemd-private-015eb2a30-apache2.service-9h6i

I accidentally deleted systemd-private-015eb2e9f67b4eef862c68e99fe0ba30-apache2.service-9h6i08 from my /tmp folder: sudo rm -R /tmp/systemd-private-015eb2e9f67b4eef862c68e99fe0ba30-apache2.service-9h6i08 and didn't mean for it not to disappear…
mah. nah.
  • 59
  • 1
  • 3
4
votes
2 answers

Apache - Allow access to globally aliased directory without auth

I got a virtualhost, which has some access restrictions configured like this: AuthType Basic AuthName "Restricted Content" AuthUserFile /var/www/domain/htdocs/.htpasswd Require valid-user In addition to…
Zulakis
  • 4,191
  • 14
  • 44
  • 75
4
votes
1 answer

Unable to get websockets to work through apache HTTPS proxy (302 error)

I'm unable to make websockets work on a node backend using an apache proxy through HTTPS to connect to the node instance. Websockets are working properly if no (apache) http(s) proxy is used. My setup: I have an apache server with multiple virtual…