Last active
April 23, 2023 03:38
-
-
Save DaveDevYT/86049150aede10df6d2f542cd8d3a0bb to your computer and use it in GitHub Desktop.
Apache Virtual Host Configuration
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost dev.example.com:80> | |
ServerName dev.example.com | |
DocumentRoot "C:/xampp/htdocs/dev.example.com/public" | |
<Directory "C:/xampp/htdocs/dev.example.com/public"> | |
Require all granted | |
AllowOverride All | |
</Directory> | |
ErrorLog "logs/dev.example.com-error.log" | |
CustomLog "logs/dev.example.com-access.log" combined | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =www.dev.example.com [OR] | |
RewriteCond %{SERVER_NAME} =dev.example.com | |
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | |
</VirtualHost> | |
<VirtualHost dev.example.com:443> | |
ServerName dev.example.com | |
DocumentRoot "C:/xampp/htdocs/dev.example.com/public" | |
<Directory "C:/xampp/htdocs/dev.example.com/public"> | |
Require all granted | |
AllowOverride All | |
</Directory> | |
ErrorLog "logs/dev.example.com-error.log" | |
CustomLog "logs/dev.example.com-access.log" combined | |
SSLEngine on | |
SSLCertificateFile "cert/dev.example.com/server.crt" | |
SSLCertificateKeyFile "cert/dev.example.com/server.key" | |
</VirtualHost> |
subjectAltName = @alt_names
[alt_names]
DNS.1 = localhost
DNS.2 = *.dev.example.com
DNS.3 = dev.example.com
DNS.4 = 127.0.0.1
DNS.5 = 127.0.0.2
comment the crt make file
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You did miss the V3.ext file