If you want do disable HTTP access, we suggest to redirect traffic from port 80 to HTTPS port 443.
1) Software version 4.20 and higher:
a) go to menu Settings > SSL
b) set parameter "Forward HTTP to HTTPS" to "Yes"
c) Save settings and reboot device.
2) Software version < 4.20:
In older software version redirection can be achieved by editing few configuration files:
NXS 97xx Rev1:
Edit file:
nano /etc/apache2/sites-enabled/000-default
At the end of the file, before end of Virtual Host add:
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
In our device it looks like that:
CustomLog ${APACHE_LOG_DIR}/access.log combined
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
Save and exit with CTRL+X,y
Then you have to enable module with command:
a2enmod rewrite
and restart Apache webserver
service apache2 restart
After that changes every request for port 80 (HTTP) will be redirected to HTTPS (port 443).
=====================================================================================================
NXS 97xx Rev2:
Please edit file:
/etc/apache2/sites-enabled/000-default.conf
and uncomment lines:
#RewriteEngine on
#RewriteCond %{SERVER_PORT} !^443$
#RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
(by uncomment I mean delete # signs at start of these lines)
Save and exit with CTRL+X,y
Then you have to enable rewrite module with command in case it's not enabled already:
a2enmod rewrite
Restart Apache engine:
systemctl restart apache2
After that changes every request for port 80 (HTTP) will be redirected to HTTPS (port 443).
=====================================================================================================
NXS 97xx Rev3:
Please edit file:
/etc/apache2/sites-enabled/default-http.conf
and uncomment lines:
#RewriteEngine on
#RewriteCond %{SERVER_PORT} !^443$
#RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
(by uncomment I mean delete # signs at start of these lines)
Save and exit with CTRL+X,y
Then you have to enable rewrite module with command in case it's not enabled already:
a2enmod rewrite
Restart Apache engine:
systemctl restart apache2
After that changes every request for port 80 (HTTP) will be redirected to HTTPS (port 443).
=====================================================================================================
MHD 8100:
Please edit file:
/etc/apache2/sites-enabled/default-http.conf
and add these three lines:
RewriteEngine on
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R=301,L]
before line:
</VirtualHost>
Save and exit with CTRL+X,y
Then you have to enable rewrite module with command in case it's not enabled already:
a2enmod rewrite
Restart Apache engine:
systemctl restart apache2
After that changes every request for port 80 (HTTP) will be redirected to HTTPS (port 443).
=====================================================================================================
NPE 9300:
Please edit file:
/mnt/nand-user/lighttpd/etc/lighttpd.conf
Add section:
$HTTP["scheme"] == "http" {
$HTTP["host"] =~ ".*" {
url.redirect = (".*" => "https://%0$0")
}
}
Then just restart webserver:
killall lighttpd
/mnt/nand-user/lighttpd/setup-autostart.sh