2021-04-30 13:14:13 +02:00
|
|
|
# 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
|
2021-04-29 12:21:05 +02:00
|
|
|
<VirtualHost *:8080>
|
|
|
|
ServerName publiccode.eu
|
2022-08-15 13:18:48 +02:00
|
|
|
ServerAlias www.publiccode.eu
|
|
|
|
ServerAlias localhost
|
2021-04-29 12:21:05 +02:00
|
|
|
|
|
|
|
ServerAdmin contact@fsfe.org
|
|
|
|
DocumentRoot /app
|
|
|
|
|
2021-04-30 13:14:13 +02:00
|
|
|
<Directory /app/>
|
|
|
|
Options FollowSymLinks Includes
|
|
|
|
AllowOverride All
|
|
|
|
Require all granted
|
|
|
|
</Directory>
|
2021-04-29 12:21:05 +02:00
|
|
|
</VirtualHost>
|