Re: IP address show Apache welcome page but domain name working!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hack3rcon@xxxxxxxxx.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-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx


[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux