HSTS Not working

Problems with the Windows version of XAMPP, questions, comments, and anything related.

HSTS Not working

Postby Pyra_ » 17. May 2017 23:41

Ok, so today I was working on my site, attempting to enable HSTS and I did in httpd.conf:

a2enmod headers

<VirtualHost *:443>
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"


<VirtualHost *:80>
[...]
ServerName midorimediagroup.us
Redirect permanent / https://midorimediagroup.us/

It said:

6:42:42 PM [Apache] Error: Apache shutdown unexpectedly.
6:42:42 PM [Apache] This may be due to a blocked port, missing dependencies,
6:42:42 PM [Apache] improper privileges, a crash, or a shutdown by another method.
6:42:42 PM [Apache] Press the Logs button to view error logs and check
6:42:42 PM [Apache] the Windows Event Viewer for more clues
6:42:42 PM [Apache] If you need more help, copy and post this
6:42:42 PM [Apache] entire log window on the forums

So here is the log:

(Well the logs were empty.)
Pyra_
 
Posts: 1
Joined: 17. May 2017 23:35
XAMPP version: 7.1.4
Operating System: Windows 8.1 x64, Build 9600

Re: HSTS Not working

Postby gsmith » 18. May 2017 20:25

a2enmod

Only in unixy OSs, I've never seen it in a windows build. Open c:\xampp\apache\conf\httpd.conf and make sure the LoadModule line for mod_headers is uncommented.

If it is already uncommented, try starting apache from a command prompt, you'll definitely see errors then.
gsmith
 
Posts: 215
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win XP to 2012R2/VS 6,9,11,14


Return to XAMPP for Windows

Who is online

Users browsing this forum: wingguy and 61 guests