Disable acces by IP

Hello,

Nginx does not support .htaccess, so you will need to edit either PHP scripts (easier) of your site or modify templates of Nginx (require more knowledge).

Normally a default "[FONT=&quot]Nginx is functioning normally[/FONT]" page from Directadmin should be shown for every request to a server over hostname or IP.

If the site is using a dedicated IP, then you can update the virtual host at Admin level by manually added instructions.
 
1. I have remove custom4
2. I have install beta DA (1.56.4)
3. This feature is in 1.57 but I can't download this beta version (your script download only 1.56.4 v)
 
Last edited:
The pre-release version always shows the current release version. You should check the Compile time, which will be the most recent, see:

Code:
[+] Directadmin beta version installed
Version: DirectAdmin v.1.56.4
Compiled on 'CentOS 7.0 64-Bit'
[B]Compile time: May 20 2019 at 22:18:44[/B]
Timestamp: '1558412280'
Compiled with IPv6
 
I have this enable after update. I think that someting wrong is with my vhosts conf.
 
Last edited:
Do your custom Nginx templates need an update?

Code:
ls -l /usr/local/directadmin/data/templates/custom/nginx*.conf

Are they missing

Code:
|FORCE_SSL_REDIRECT|
?


p.s. It's working on my end.
 
The 4 templates should have it:

Code:
# grep '|FORCE_SSL_REDIRECT|' nginx*conf
nginx_server.conf:      |FORCE_SSL_REDIRECT|
nginx_server_secure.conf:       |FORCE_SSL_REDIRECT|
nginx_server_secure_sub.conf:   |FORCE_SSL_REDIRECT|
nginx_server_sub.conf:  |FORCE_SSL_REDIRECT|


you need to fix your templates.
 
Need only add |FORCE_SSL_REDIRECT| to them and rebuild nginx??
I don't have two templates

nginx_server_secure_sub.conf
nginx_server_sub.conf

but this two are here /usr/local/directadmin/data/templates/
i have copy them to ./custom now (have force_ssl) and still url https://ip-193.107.90.20.kylos.net.pl/ working without redirect to domain name
 
Last edited:
Show nginx.conf in full here. You can find it under /usr/local/directadmin/data/users/user/nginx.conf, where user is an username under which you host your site.
 
Back
Top