-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathpubliccode.eu.conf
More file actions
34 lines (28 loc) · 861 Bytes
/
publiccode.eu.conf
File metadata and controls
34 lines (28 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# SPDX-FileCopyrightText: 2017 Free Software Foundation Europe e.V. <https://fsfe.org>
#
# SPDX-License-Identifier: GPL-3.0-or-later
# Redirect www subdomain to non-www
<VirtualHost *:8080>
RewriteEngine On
# Get protocol
RewriteCond %{HTTPS} =on
RewriteRule ^(.*)$ - [env=proto:https]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ - [env=proto:http]
# Rewrite to proto://www-less-host/location
RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
RewriteRule ^(.*)$ %{ENV:proto}://%1$1 [R=301,L]
</VirtualHost>
# The normal virtual host for this specific site
<VirtualHost *:8080>
ServerName publiccode.eu
ServerAlias www.publiccode.eu
ServerAlias localhost
ServerAdmin contact@fsfe.org
DocumentRoot /app
<Directory /app/>
Options FollowSymLinks Includes
AllowOverride All
Require all granted
</Directory>
</VirtualHost>