<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=Big5" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
<a class="moz-txt-link-abbreviated" href="mailto:edwardspl@ita.org.mo">edwardspl@ita.org.mo</a> wrote:
<blockquote cite="mid46F4A016.60907@ita.org.mo" type="cite">
  <pre wrap="">Paul Lemmons wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">NameVirtualHost *:80

<VirtualHost *:80>
   ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:you.me@domain.com">you.me@domain.com</a>
   ServerName  <a class="moz-txt-link-abbreviated" href="http://www.domain.com">www.domain.com</a>
   ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.net">www.domain.net</a>
   ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.org">www.domain.org</a>
   ErrorLog  /var/log/httpd/www_error_log
   CustomLog /var/log/httpd/www_access_log combined
   Redirect permanent / <a class="moz-txt-link-freetext" href="https://www.domain.com/">https://www.domain.com/</a>
</VirtualHost>


Note that the root to the site (/) is redirected to
<a class="moz-txt-link-freetext" href="https://www.domain.com/">https://www.domain.com/</a>. This hasthe effect of redirecting *everything*
    </pre>
  </blockquote>
  <pre wrap=""><!---->>from the http: site to the https: site.
  </pre>
  <blockquote type="cite">
    <pre wrap="">Of course, for this to be effective the https: site must exist.

<VirtualHost *:443>
  DocumentRoot /my/doc-root/for/https/
  ServerName  <a class="moz-txt-link-abbreviated" href="http://www.domain.com">www.domain.com</a>
  ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.net">www.domain.net</a>
  ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.org">www.domain.org</a>

  ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:you.me@domain.com">you.me@domain.com</a>
   ...
   ...
   ...
</VirtualHost>
 

    </pre>
  </blockquote>
  <pre wrap=""><!---->Hello Pual,

1, As the following is good for work also ?

Listen 80
Listen 443

NameVirtualHost *:80

<VirtualHost *:80>
    ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:you.me@domain.com">you.me@domain.com</a>
    ServerName  <a class="moz-txt-link-abbreviated" href="http://www.domain.com">www.domain.com</a>
    ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.net">www.domain.net</a>
    ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.org">www.domain.org</a>
    ErrorLog  /var/log/httpd/www_error_log
    CustomLog /var/log/httpd/www_access_log combined
    Redirect permanent / <a class="moz-txt-link-freetext" href="https://www.domain.com/">https://www.domain.com/</a>
</VirtualHost>

<VirtualHost *:443>
   DocumentRoot /my/doc-root/for/https/
   ServerName  <a class="moz-txt-link-abbreviated" href="http://www.domain.com">www.domain.com</a>
   ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.net">www.domain.net</a>
   ServerAlias <a class="moz-txt-link-abbreviated" href="http://www.domain.org">www.domain.org</a>
   ServerAdmin <a class="moz-txt-link-abbreviated" href="mailto:you.me@domain.com">you.me@domain.com</a>
</VirtualHost>

2, What means by the permanent of redirect function ?

Thanks !

Edward.

  </pre>
</blockquote>
Hello,<br>
<br>
If there is only one IP address, then the config is okay ?<br>
<br>
Thanks !<br>
<br>
Edward.<br>
</body>
</html>