Apache – how to get REMOTE_USER variable

Finally got it to works! 😀 Download the module from here https://www.apachehaus.net/modules/mod_authnz_sspi/ (x86 for 32 bit and x64 for 64 bit apache) Copy the mod_authnz_sspi.so from Apache24\modules folder and place it in the modules folder of your Apache folder on your webserver Under the httpd.conf file (Config file for your apache) place this line of … Read more

How can I replace Apache HTTP code 404 to 200

From: http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html Create a blank file in your main web directory named 404.. can be blank. Add this to your .htaccess file: Redirect 200 /404 ErrorDocument 404 /404 That will change the Apache ErrorDocument to the /404 file. But the Redirect line causes requests for /404 to issue a 200 OK response instead of a … Read more

.htaccess 301 redirect for all https to http EXCEPT ONE PAGE

Apache/2.2.6 (Win32) mod_ssl/2.2.8 OpenSSL/0.9.8g PHP/5.2.6 I’ve tested it locally, all use cases seem to work fine. If you have further questions, feel free to ask. # Rewrite Rules for example.com RewriteEngine On RewriteBase / # Redirect from example.com to www.example.com RewriteCond %{HTTP_HOST} ^example\.com [NC] RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L] # Turn SSL on for payments RewriteCond … Read more

SSE(EventSource): why no more than 6 connections?

The reason could be every EventSource object initiates the new HTTP session and in fact opens new tcp/ip socket. Because of you’re pushing data from server continuously in infinite loop, the socket keeps open continuously. All web browsers has an upper limit on simultaneous active HTTP/1 connections to the same server. Normally in range of … Read more

How do I configure Apache2 to allow multiple simultaneous connections from same IP address?

I discovered the answer to my problem. It turns out others have encountered this difficulty before: Simultaneous Requests to PHP Script The key detail is that file-based sessions in PHP cause all requests from the same client to be processed sequentially in a queue, rather than in parallel. In order to solve this problem, it … Read more

Apache is not sending 304 response (if mod_deflate and AddOutputFilterByType is enabled)

This is a known bug in Apache. See Apache bug #45023, and summary of Apache 304 etags and mod_deflate. Rebuilding from svn will fix the issue. The resolution was to revert the change that appended “-gzip” to the etag. However, there are associated HTTP compliance problems. If you can’t rebuild Apache, there is a suggested … Read more

Apache .htaccess redirect to HTTPS before asking for user authentication

If you’re running Apache 2.4 you can use configuration sections to solve this quite easily. Eg… # Redirect to HTTPS RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L] # Authenticate users only when using HTTPS # Enable for <v2.4 # SSLRequireSSL # ErrorDocument 403 /secure-folder/ # Enable for >v2.4 <If “%{HTTPS} == ‘on'”> AuthType … Read more