IP address show Apache welcome page but domain name working!

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

IP address show Apache welcome page but domain name working!

Jason Long
Hello,
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?
I enabled "mod_rewrite" and my Virtual Host config is:

RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.com [OR]
RewriteCond %{SERVER_NAME} =www.mydomain.com
RewriteCond %{HTTP_HOST} ^"Server IP Address"
RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

But problem not solved.
Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Walter Penn
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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Yehuda Katz
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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
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 ^ <a href="https://%">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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
Can anyone here help me?






On Tuesday, September 22, 2020, 04:56:50 PM GMT+3:30, Jason Long <[hidden email]> wrote:





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 ^ <a href="https://%">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 <[hidden email]> 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 <[hidden email]> 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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Eric Covener
In reply to this post by Jason Long
On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
>
> Hello,
> 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?
> I enabled "mod_rewrite" and my Virtual Host config is:
>
> RewriteEngine on
> RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> RewriteCond %{SERVER_NAME} =www.mydomain.com
> RewriteCond %{HTTP_HOST} ^"Server IP Address"

Missing an [OR[ here on 2nd condition?

> RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
>
> But problem not solved.
> Thank you.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
When I browse my website by its IP address then browser show me "Your connection is not private".





On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
>
> Hello,
> 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?
> I enabled "mod_rewrite" and my Virtual Host config is:
>
> RewriteEngine on
> RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> RewriteCond %{SERVER_NAME} =www.mydomain.com
> RewriteCond %{HTTP_HOST} ^"Server IP Address"

Missing an [OR[ here on 2nd condition?


> RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
>
> But problem not solved.
> Thank you.

>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Eric Covener
This is not avoidable.
The SSL handshake is always going to happen before the server has any
chance to redirect a request.

On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:

>
> I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
> When I browse my website by its IP address then browser show me "Your connection is not private".
>
>
>
>
>
> On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>
>
>
>
>
> On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
> >
> > Hello,
> > 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?
> > I enabled "mod_rewrite" and my Virtual Host config is:
> >
> > RewriteEngine on
> > RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> > RewriteCond %{SERVER_NAME} =www.mydomain.com
> > RewriteCond %{HTTP_HOST} ^"Server IP Address"
>
> Missing an [OR[ here on 2nd condition?
>
>
> > RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> >
> > But problem not solved.
> > Thank you.
>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> --
> Eric Covener
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
How can I solve it?






On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





This is not avoidable.
The SSL handshake is always going to happen before the server has any
chance to redirect a request.

On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:

>
> I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
> When I browse my website by its IP address then browser show me "Your connection is not private".
>
>
>
>
>
> On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>
>
>
>
>
> On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
> >
> > Hello,
> > 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?
> > I enabled "mod_rewrite" and my Virtual Host config is:
> >
> > RewriteEngine on
> > RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> > RewriteCond %{SERVER_NAME} =www.mydomain.com
> > RewriteCond %{HTTP_HOST} ^"Server IP Address"
>
> Missing an [OR[ here on 2nd condition?
>
>
> > RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> >
> > But problem not solved.
> > Thank you.
>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> --
> Eric Covener
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Eric Covener
Use a certificate valid for (SAN entry) your IP or don't access the
server via the IP.

On Thu, Sep 24, 2020 at 11:26 AM Jason Long <[hidden email]> wrote:

>
> How can I solve it?
>
>
>
>
>
>
> On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>
>
>
>
>
> This is not avoidable.
> The SSL handshake is always going to happen before the server has any
> chance to redirect a request.
>
> On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:
> >
> > I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
> > When I browse my website by its IP address then browser show me "Your connection is not private".
> >
> >
> >
> >
> >
> > On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
> >
> >
> >
> >
> >
> > On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
> > >
> > > Hello,
> > > 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?
> > > I enabled "mod_rewrite" and my Virtual Host config is:
> > >
> > > RewriteEngine on
> > > RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> > > RewriteCond %{SERVER_NAME} =www.mydomain.com
> > > RewriteCond %{HTTP_HOST} ^"Server IP Address"
> >
> > Missing an [OR[ here on 2nd condition?
> >
> >
> > > RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> > >
> > > But problem not solved.
> > > Thank you.
> >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> >
> > --
> > Eric Covener
> > [hidden email]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> --
> Eric Covener
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
I'm using Let's Encrypt. Is it not enough?






On Thursday, September 24, 2020, 08:45:06 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





Use a certificate valid for (SAN entry) your IP or don't access the
server via the IP.

On Thu, Sep 24, 2020 at 11:26 AM Jason Long <[hidden email]> wrote:

>
> How can I solve it?
>
>
>
>
>
>
> On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>
>
>
>
>
> This is not avoidable.
> The SSL handshake is always going to happen before the server has any
> chance to redirect a request.
>
> On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:
> >
> > I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
> > When I browse my website by its IP address then browser show me "Your connection is not private".
> >
> >
> >
> >
> >
> > On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
> >
> >
> >
> >
> >
> > On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
> > >
> > > Hello,
> > > 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?
> > > I enabled "mod_rewrite" and my Virtual Host config is:
> > >
> > > RewriteEngine on
> > > RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> > > RewriteCond %{SERVER_NAME} =www.mydomain.com
> > > RewriteCond %{HTTP_HOST} ^"Server IP Address"
> >
> > Missing an [OR[ here on 2nd condition?
> >
> >
> > > RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> > >
> > > But problem not solved.
> > > Thank you.
> >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> >
> > --
> > Eric Covener
> > [hidden email]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]

>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> --
> Eric Covener
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jonathon Koyle
Let's Encrypt does issue certs with SAN, but you would have to specify the IP in your CSR, what that looks like depends on what LE you are using.

On Thu, Sep 24, 2020, 11:28 AM Jason Long <[hidden email]> wrote:
I'm using Let's Encrypt. Is it not enough?






On Thursday, September 24, 2020, 08:45:06 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





Use a certificate valid for (SAN entry) your IP or don't access the
server via the IP.

On Thu, Sep 24, 2020 at 11:26 AM Jason Long <[hidden email]> wrote:
>
> How can I solve it?
>
>
>
>
>
>
> On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>
>
>
>
>
> This is not avoidable.
> The SSL handshake is always going to happen before the server has any
> chance to redirect a request.
>
> On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:
> >
> > I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
> > When I browse my website by its IP address then browser show me "Your connection is not private".
> >
> >
> >
> >
> >
> > On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
> >
> >
> >
> >
> >
> > On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
> > >
> > > Hello,
> > > 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?
> > > I enabled "mod_rewrite" and my Virtual Host config is:
> > >
> > > RewriteEngine on
> > > RewriteCond %{SERVER_NAME} =mydomain.com [OR]
> > > RewriteCond %{SERVER_NAME} =www.mydomain.com
> > > RewriteCond %{HTTP_HOST} ^"Server IP Address"
> >
> > Missing an [OR[ here on 2nd condition?
> >
> >
> > > RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
> > >
> > > But problem not solved.
> > > Thank you.
> >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [hidden email]
> > > For additional commands, e-mail: [hidden email]
> > >
> >
> >
> > --
> > Eric Covener
> > [hidden email]
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]

>
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [hidden email]
> > For additional commands, e-mail: [hidden email]
> >
>
>
> --
> Eric Covener
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

Jason Long
How?
I don't know it is a hard task!!!





On Friday, September 25, 2020, 04:03:45 PM GMT+3:30, Jonathon Koyle <[hidden email]> wrote:





Let's Encrypt does issue certs with SAN, but you would have to specify the IP in your CSR, what that looks like depends on what LE you are using.

On Thu, Sep 24, 2020, 11:28 AM Jason Long <[hidden email]> wrote:

> I'm using Let's Encrypt. Is it not enough?
>
>
>
>
>
>
> On Thursday, September 24, 2020, 08:45:06 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>
>
>
>
>
> Use a certificate valid for (SAN entry) your IP or don't access the
> server via the IP.
>
> On Thu, Sep 24, 2020 at 11:26 AM Jason Long <[hidden email]> wrote:
>>
>> How can I solve it?
>>
>>
>>
>>
>>
>>
>> On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>>
>>
>>
>>
>>
>> This is not avoidable.
>> The SSL handshake is always going to happen before the server has any
>> chance to redirect a request.
>>
>> On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:
>> >
>> > I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
>> > When I browse my website by its IP address then browser show me "Your connection is not private".
>> >
>> >
>> >
>> >
>> >
>> > On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:
>> >
>> >
>> >
>> >
>> >
>> > On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:
>> > >
>> > > Hello,
>> > > 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?
>> > > I enabled "mod_rewrite" and my Virtual Host config is:
>> > >
>> > > RewriteEngine on
>> > > RewriteCond %{SERVER_NAME} =mydomain.com [OR]
>> > > RewriteCond %{SERVER_NAME} =www.mydomain.com
>> > > RewriteCond %{HTTP_HOST} ^"Server IP Address"
>> >
>> > Missing an [OR[ here on 2nd condition?
>> >
>> >
>> > > RewriteRule ^ <a href="https://%">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
>> > >
>> > > But problem not solved.
>> > > Thank you.
>> >
>> > >
>> > > ---------------------------------------------------------------------
>> > > To unsubscribe, e-mail: [hidden email]
>> > > For additional commands, e-mail: [hidden email]
>> > >
>> >
>> >
>> > --
>> > Eric Covener
>> > [hidden email]
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>
>>
>> >
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [hidden email]
>> > For additional commands, e-mail: [hidden email]
>> >
>>
>>
>> --
>> Eric Covener
>> [hidden email]
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
> --
> Eric Covener
> [hidden email]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

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

angel Hall-Coulston
Hi, I’m not familiar with 'Let’s Encrypt' but the following link should be of help. I recommend you sign up to their community if you need to post other questions if you don’t find the answer there. Have a good day friend 🙂

On 25 Sep 2020, at 22:11, Jason Long <[hidden email]> wrote:

How?
I don't know it is a hard task!!!





On Friday, September 25, 2020, 04:03:45 PM GMT+3:30, Jonathon Koyle <[hidden email]> wrote:





Let's Encrypt does issue certs with SAN, but you would have to specify the IP in your CSR, what that looks like depends on what LE you are using.

On Thu, Sep 24, 2020, 11:28 AM Jason Long <[hidden email]> wrote:
I'm using Let's Encrypt. Is it not enough?






On Thursday, September 24, 2020, 08:45:06 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





Use a certificate valid for (SAN entry) your IP or don't access the
server via the IP.

On Thu, Sep 24, 2020 at 11:26 AM Jason Long <[hidden email]> wrote:

How can I solve it?






On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





This is not avoidable.
The SSL handshake is always going to happen before the server has any
chance to redirect a request.

On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:

I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
When I browse my website by its IP address then browser show me "Your connection is not private".





On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:

Hello,
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?
I enabled "mod_rewrite" and my Virtual Host config is:

RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.com [OR]
RewriteCond %{SERVER_NAME} =www.mydomain.com
RewriteCond %{HTTP_HOST} ^"Server IP Address"

Missing an [OR[ here on 2nd condition?


RewriteRule ^ <a href="https://%{SERVER_NAME}%{REQUEST_URI}" class="">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

But problem not solved.
Thank you.


---------------------------------------------------------------------
To unsubscribe, [hidden email]
For additional commands, [hidden email]



--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]





---------------------------------------------------------------------
To unsubscribe, [hidden email]
For additional commands, [hidden email]



--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, [hidden email]
For additional commands, [hidden email]


          www.art2.art




signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

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

angel Hall-Coulston
In reply to this post by Jason Long
So sorry, forgot to add link in last message; early day and not enough tea… here is the link hope this helps: https://community.letsencrypt.org/t/how-to-create-a-san-cert/30446


On 25 Sep 2020, at 22:11, Jason Long <[hidden email]> wrote:

How?
I don't know it is a hard task!!!





On Friday, September 25, 2020, 04:03:45 PM GMT+3:30, Jonathon Koyle <[hidden email]> wrote:





Let's Encrypt does issue certs with SAN, but you would have to specify the IP in your CSR, what that looks like depends on what LE you are using.

On Thu, Sep 24, 2020, 11:28 AM Jason Long <[hidden email]> wrote:
I'm using Let's Encrypt. Is it not enough?






On Thursday, September 24, 2020, 08:45:06 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





Use a certificate valid for (SAN entry) your IP or don't access the
server via the IP.

On Thu, Sep 24, 2020 at 11:26 AM Jason Long <[hidden email]> wrote:

How can I solve it?






On Thursday, September 24, 2020, 06:54:08 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





This is not avoidable.
The SSL handshake is always going to happen before the server has any
chance to redirect a request.

On Thu, Sep 24, 2020 at 11:20 AM Jason Long <[hidden email]> wrote:

I added an [OR] an the end of "RewriteCond %{SERVER_NAME} =www.example.net" line but not matter.
When I browse my website by its IP address then browser show me "Your connection is not private".





On Thursday, September 24, 2020, 06:40:46 PM GMT+3:30, Eric Covener <[hidden email]> wrote:





On Tue, Sep 22, 2020 at 3:38 AM Jason Long <[hidden email]> wrote:

Hello,
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?
I enabled "mod_rewrite" and my Virtual Host config is:

RewriteEngine on
RewriteCond %{SERVER_NAME} =mydomain.com [OR]
RewriteCond %{SERVER_NAME} =www.mydomain.com
RewriteCond %{HTTP_HOST} ^"Server IP Address"

Missing an [OR[ here on 2nd condition?


RewriteRule ^ <a href="https://%{SERVER_NAME}%{REQUEST_URI}" class="">https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]

But problem not solved.
Thank you.


---------------------------------------------------------------------
To unsubscribe, [hidden email]
For additional commands, [hidden email]



--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]





---------------------------------------------------------------------
To unsubscribe, [hidden email]
For additional commands, [hidden email]



--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



--
Eric Covener
[hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]



---------------------------------------------------------------------
To unsubscribe, [hidden email]
For additional commands, [hidden email]


          www.art2.art




signature.asc (849 bytes) Download Attachment