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
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
  • 121
  • 7
  • 29
4
votes
4 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
  • 237
  • 1
  • 5
  • 15
4
votes
1 answer

How to debug curl? gnutls_handshake failed -unexpected TLS packet (OpenSSL)

How can I debug curl error further when Apache error.log is not showing any? (35) gnutls_handshake() failed: An unexpected TLS packet was received. curl -v https://example.com * Rebuilt URL to: https://example.com/ * Trying 127.0.0.1... *…
Markus
  • 171
  • 1
  • 1
  • 6
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
2 answers

AWStats not showing anymore Referrers / Keywords /keyphrases

Me and my colleagues are struggling to find a solution over a strange problem with AWStats. Some months ago, we moved a production environment from a CentOS to an Ubuntu 14.04. Since then, the Referrers sections is not showing anymore browsers /…
John
  • 49
  • 4
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,153
  • 14
  • 48
  • 76
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…
4
votes
2 answers

How do I distribute HTTP traffic to the closest server?

This is kind of a two part question. So I have a DigitalOcean Droplet in Toronto with a lamp stack on it (with a website of course). I want to be create a snapshot of that droplet and deploy a clone in perhaps San Francisco and Amsterdam. How do i…
4
votes
3 answers

Apache RewriteMap with URLs containing space doesn't work

I am actually using a RewriteMap directive inside my vhost to redirect a list of 800 URLs. It works quiet well: RewriteEngine On RewriteMap redirects dbm=db:/data/apps/project/current/configuration/etc/httpd/conf/redirects.db RewriteCond…
COil
  • 207
  • 3
  • 12
4
votes
3 answers

apache multiviews, how to disable it

I have a OS X Snow Leropard Server running and I want to disable multivewis from Apache. I could add Options -MultiViews to each .htacces file I have, but I guess there must be a global option. Disabling mod_negotiation.so renders all pages useless…
Sorin Buturugeanu
4
votes
0 answers

Sudden and sporadic errors from mod_proxy

[Edit, addition]: Looks like this could be caused by an attack attempt. But not sure how it can be avoided? https://www.mail-archive.com/bugs@httpd.apache.org/msg57219.html I have an Ubuntu server with apache2. mod_proxy is forwarding requests to a…
4
votes
2 answers

.htaccess - Exclude folder from basic auth protection

I have a website where no one is allowed to enter without entering the basic auth credentials. However, I need the media folder to be accessible by everyone, because we are using a third party extension which creates PDF's and we can only fully test…
Black
  • 461
  • 1
  • 8
  • 20
4
votes
1 answer

htaccess rewrite /dir/*.jpg to /dir/webp/*.webp only when webp file exists

I'm trying to rewrite all website files (*.jpg|*.gif|*.png) to *.webp in a subdir, but only when the *.webp file exists. Previous and new files have the same name, only changing the extension and *.webp files are all under subdir of the original…
4
votes
2 answers

Can I use apache2 and memcache in same server?

I am really new to server development. I have a server (Server version: Apache/2.4.41 (Ubuntu)) for Django and it's running on apache2. I want to use Memcache for a large queryset. I just wanna use the following Django future: CACHES = { …
Murat Demir
  • 151
  • 5
4
votes
1 answer

Improving apache2 security

I have been analyzing my server logs for a week and I found bad intentioned requests, and I want to know if is possible to protect it, because I have no clue about what I should to, the only idea I got is creating an .htaccess rule to block certain…