aboutsummaryrefslogtreecommitdiff
path: root/apache.conf
diff options
context:
space:
mode:
Diffstat (limited to 'apache.conf')
-rw-r--r--apache.conf37
1 files changed, 37 insertions, 0 deletions
diff --git a/apache.conf b/apache.conf
new file mode 100644
index 0000000..f4dd049
--- /dev/null
+++ b/apache.conf
@@ -0,0 +1,37 @@
+<IfModule mod_ssl.c>
+<VirtualHost *:443>
+ DocumentRoot /var/www/kagamino_blog
+ ServerName blog.kagamino.dev
+
+ <IfModule mod_headers.c>
+ Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
+ </IfModule>
+ <Directory /var/www/kagamino_blog>
+ Require all granted
+ AllowOverride All
+ Options FollowSymLinks MultiViews
+ </Directory>
+
+Include /etc/letsencrypt/options-ssl-apache.conf
+SSLCertificateFile /etc/letsencrypt/live/blog.kagamino.dev/fullchain.pem
+SSLCertificateKeyFile /etc/letsencrypt/live/blog.kagamino.dev/privkey.pem
+</VirtualHost>
+</IfModule>
+<IfModule mod_ssl.c>
+<VirtualHost *:80>
+ DocumentRoot /var/www/kagamino_blog
+ ServerName blog.kagamino.dev
+
+ <IfModule mod_headers.c>
+ Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
+ </IfModule>
+ <Directory /var/www/kagamino_blog>
+ Require all granted
+ AllowOverride All
+ Options FollowSymLinks MultiViews
+ </Directory>
+RewriteEngine on
+RewriteCond %{SERVER_NAME} =blog.kagamino.dev
+RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
+</VirtualHost>
+</IfModule> \ No newline at end of file