How to solve http / https / www
-
I have an LXC container in a virtualized Proxmox VE environment. This LXC runs an apache web server with 4 web pages
Config file for www.my-domain.dyndns.com
/etc/apache2/sites-available/www.my-domain.dyndns.com.conf
<VirtualHost *:80> DocumentRoot /var/www/www.my-domain.dyndns.com ServerName my-domain.dyndns.com ServerAlias www.my-domain.dyndns.com ServerAdmin webmaster@my-domain.dyndns.com RewriteEngine on RewriteCond %{HTTP_HOST} ^my-domain\.dyndns\.com$ [NC] RewriteRule ^(.*)$ http://www.my-domain.dyndns.com$1 [R=301,NE,L] RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L,NE] </VirtualHost> <VirtualHost *:443> DocumentRoot /var/www/www.my-domain.dyndns.com ServerName my-domain.dyndns.com ServerAlias www.my-domain.dyndns.com ServerAdmin webmaster@my-domain.dyndns.com <IfModule mod_ssl.c> SSLEngine on SSLCertificateKeyFile /etc/letsencrypt/live/my-domain.dyndns.com/privkey.pem SSLCertificateFile /etc/letsencrypt/live/my-domain.dyndns.com/cert.pem SSLCertificateChainFile /etc/letsencrypt/live/my-domain.dyndns.com/chain.pem # SSLCertificateChainFile /etc/letsencrypt/live/my-domain.dyndns.com/fullchain.pem </IfModule> RewriteEngine on RewriteCond %{HTTP_HOST} ^my-domain\.ddns\.com$ [NC] RewriteRule ^(.*)$ https://www.my-domain.dyndns.com$1 [R=301,NE,L] </VirtualHost>
Until now, I used a routerboard (Mikrotik) and everything worked great. The configuration file is set as follows
When the client writes to the urlmy-domain.dyndns.com www.my-domain.dyndns.com http://www.my-domain.dyndns.com https://www.my-domain.dyndns.com
so it always redirects to
https://www.my-domain.dyndns.com
I've been using pfsense for about 2 days now and it doesn't work. When the client writes to the url
my-domain.dyndns.com www.my-domain.dyndns.com http://www.my-domain.dyndns.com
the webpage will not be displayed. When the client writes to the url
https://my-domain.dyndns.com https://www.my-domain.dyndns.com
then it works great.
Now I don't know where the mistake is. Do I need to change anything in the apache configuration or in pfsense? -
So forward HTTP as well to the server.
-
Hi
I completely forgot about it.
thanks