I did:

# httpd -S
[Tue Sep 22 16:54:21.799963 2020] [so:warn] [pid 1419476:tid 139725243156800] 
AH01574: module reqtimeout_module is already loaded, skipping
[Tue Sep 22 16:54:21.800135 2020] [so:warn] [pid 1419476:tid 139725243156800] 
AH01574: module headers_module is already loaded, skipping
[Tue Sep 22 16:54:21.800275 2020] [so:warn] [pid 1419476:tid 139725243156800] 
AH01574: module deflate_module is already loaded, skipping
VirtualHost configuration:
*:443                  is a NameVirtualHost
         default server www.example.net (/etc/httpd/conf.d/ssl.conf:40)
         port 443 namevhost www.example.net (/etc/httpd/conf.d/ssl.conf:40)
         port 443 namevhost example.net (/etc/httpd/conf.d/wp-le-ssl.conf:2)
                 alias www.example.net
*:80                   www.example.net (/etc/httpd/conf.d/wp.conf:1)
ServerRoot: "/etc/httpd"
Main DocumentRoot: "/var/www/html"
Main ErrorLog: "/etc/httpd/logs/error_log"
Mutex authn-socache: using_defaults
Mutex ssl-cache: using_defaults
Mutex default: dir="/etc/httpd/run/" mechanism=default 
Mutex cache-socache: using_defaults
Mutex fcgid-pipe: using_defaults
Mutex authdigest-opaque: using_defaults
Mutex watchdog-callback: using_defaults
Mutex proxy-balancer-shm: using_defaults
Mutex rewrite-map: using_defaults
Mutex ssl-stapling-refresh: using_defaults
Mutex authdigest-client: using_defaults
Mutex lua-ivm-shm: using_defaults
Mutex fcgid-proctbl: using_defaults
Mutex ssl-stapling: using_defaults
Mutex proxy: using_defaults
PidFile: "/etc/httpd/run/httpd.pid"
Define: DUMP_VHOSTS
Define: DUMP_RUN_CFG
Define: MODSEC_2.5
Define: MODSEC_2.9
User: name="apache" id=48
Group: name="apache" id=48


And my Virtual Host is :

<VirtualHost *:80>
Header always set Strict-Transport-Security "max-age=63072000; 
includeSubdomains; preload"
ServerAdmin root@localhost
ServerName www.example.net
ServerAlias www.example.net
DocumentRoot /var/www/wordpress
<Directory "/var/www/wordpress">
Options Indexes FollowSymLinks
AllowOverride all
Require all granted
</Directory>
ErrorLog /var/log/httpd/wordpress_error.log
CustomLog /var/log/httpd/wordpress_access.log common
RewriteEngine on
RewriteCond %{SERVER_NAME} =example.net [OR]
RewriteCond %{SERVER_NAME} =www.example.net 
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Redirect permanent / https://www.example.net
</VirtualHost>







On Tuesday, September 22, 2020, 04:50:29 PM GMT+3:30, Yehuda Katz 
<yeh...@ymkatz.net> wrote: 





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
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to