# apachectl -S
#
My Virtual Host configuration is:
<VirtualHost *:80>
Header always set Strict-Transport-Security "max-age=63072000;
includeSubdomains; preload"
ServerAdmin root@localhost
ServerName www.example.com
ServerAlias www.example.com
DocumentRoot /var/www/wp
<Directory "/var/www/wp">
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.com [OR]
RewriteCond %{SERVER_NAME} =www.example.com [OR]
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
Redirect permanent / https://www.example.com
</VirtualHost>
On Monday, October 12, 2020, 06:06:32 PM GMT+3:30, Frank <[email protected]>
wrote:
I would take a step back. The approach stated below is not only
convoluted, but ignores the existing configuration.
First, run apachectl -S to see what your existing vhosts are set up as.
Then, from the default (first) vhost, you simply need a ServerName
directive, and Redirect. The former is required for name-based vhosts:
<VirtualHost *:80>
ServerName defaultvhost
Redirect / https://hostname.tld/
</VirtualHost>
If you don't want to use your existing first vhost as a default for
http://ip/ requests, define another.
On 12/10/20 10:26 AM, Jason Long wrote:
> Thank you.
> I added that lines to my Virtual Host file but it show me "Your connection is
> not private".
>
>
>
>
>
>
> On Monday, October 12, 2020, 05:16:27 PM GMT+3:30, James Smith
> <[email protected]> wrote:
>
>
>
>
>
> Yes - with Apache you put a default virtual host which redirects all traffic
> to your https server
>
> <VirtualHost *:80>
> RequestHeader unset X-is-ssl
> <Location />
> <Limit OPTIONS>
> Require all denied
> </Limit>
> Require all granted
> </Location>
> ProxyPreserveHost on
> RewriteEngine on
> RewriteRule ^(.*)$ https://myservername.com%{REQUEST_URI}
>[R=permanent,L,NE]
> </VirtualHost>
>
> You can do something for 443 as well.
>
> -----Original Message-----
> From: Jason Long <[email protected]>
> Sent: 12 October 2020 14:10
> To: [email protected]
> Subject: Re: [users@httpd] Forwarding IP to HTTPS. [EXT]
>
> Thank you.
> I want when a user enter my server IP address in his\her browser then it
> forward to
> "https://urldefense.proofpoint.com/v2/url?u=https-3A__mywebsite.com&d=DwIFaQ&c=D7ByGjS34AllFgecYw0iC6Zq7qlm8uclZFI0SqQnqBo&r=oH2yp0ge1ecj4oDX0XM7vQ&m=rK8vCBmQ5CHbZU9JjXzRNDNz8RofAv82ZlfXjYIEtgY&s=rt4c_6jtMKJiE15dKtx138HTXgpDRMPcmCGbZ0yYwZk&e=
> ".
>
>
>
>
>
>
> On Monday, October 12, 2020, 12:14:31 PM GMT+3:30, Antony Stone
> <[email protected]> wrote:
>
>
>
>
>
> On Monday 12 October 2020 at 07:25:56, Jason Long wrote:
>
>> Hello,
>> Forwarding an IP address to HTTPS domain is the task of Apache or SSL?
>
> What do you mean by "forwarding", and what protocol (presumably either HTTP or
> HTTPS) is being used by the client application which starts the connection
> (ie: a web browser or equivalent)?
>
> Please give more details about your question so that we have a better idea
> what the correct answer might be.
>
>
> Antony.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]