edwardspl@xxxxxxxxxx wrote:
Hello,Paul Lemmons wrote:NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin you.me@xxxxxxxxxx ServerName www.domain.com ServerAlias www.domain.net ServerAlias www.domain.org ErrorLog /var/log/httpd/www_error_log CustomLog /var/log/httpd/www_access_log combined Redirect permanent / https://www.domain.com/ </VirtualHost> Note that the root to the site (/) is redirected to https://www.domain.com/. This hasthe effect of redirecting *everything*>from the http: site to the https: site.Of course, for this to be effective the https: site must exist. <VirtualHost *:443> DocumentRoot /my/doc-root/for/https/ ServerName www.domain.com ServerAlias www.domain.net ServerAlias www.domain.org ServerAdmin you.me@xxxxxxxxxx ... ... ... </VirtualHost>Hello Pual, 1, As the following is good for work also ? Listen 80 Listen 443 NameVirtualHost *:80 <VirtualHost *:80> ServerAdmin you.me@xxxxxxxxxx ServerName www.domain.com ServerAlias www.domain.net ServerAlias www.domain.org ErrorLog /var/log/httpd/www_error_log CustomLog /var/log/httpd/www_access_log combined Redirect permanent / https://www.domain.com/ </VirtualHost> <VirtualHost *:443> DocumentRoot /my/doc-root/for/https/ ServerName www.domain.com ServerAlias www.domain.net ServerAlias www.domain.org ServerAdmin you.me@xxxxxxxxxx </VirtualHost> 2, What means by the permanent of redirect function ? Thanks ! Edward. If there is only one IP address, then the config is okay ? Thanks ! Edward. |