That file is for Debian-flavor distributions. On RedHat-flavors, a similar file would be in /etc/httpd/conf.d if it exists (not in conf.modules.d though). You can check which files have the actual config for a vhost by running the command 'httpd -S'.
- Y Sent from a device with a very small keyboard and hyperactive autocorrect. On Tue, Sep 22, 2020, 9:15 AM Jason Long <hack3r...@yahoo.com.invalid> wrote: > Where is "000-default.conf" file? I have not it!! > > # ls /etc/httpd/conf.modules.d/ > 00-base.conf 00-proxy_timeout.conf 10-mod_security.conf > 00-dav.conf 00-ssl.conf 10-proxy_h2.conf > 00-lua.conf 00-systemd.conf 15-php.conf > 00-mpm.conf 01-cgi.conf README > 00-optional.conf 10-fcgid.conf > 00-proxy.conf 10-h2.conf > > > > > > > On Tuesday, September 22, 2020, 11:12:28 AM GMT+3:30, Walter Penn > <walter@pobox.store> wrote: > > > > > > Jason Long wrote: > > When I visit my website by its IP address the welcome page of Apache > showed, but with"https://domain-name.net" everything is OK. How can I > block direct access by IP or forward it to domain? > > In the 000-default.conf put these lines: > > > > RewriteEngine on > RewriteRule ^/ > https://your.domain.name/ [R,L] > > Retart httpd then it will work. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org > For additional commands, e-mail: users-h...@httpd.apache.org > >