All pastes #633841 Raw Edit

Miscellany

public text v1 · immutable
#633841 ·published 2007-07-25 23:20 UTC
rendered paste body
mail4:/etc/apache2# /etc/init.d/apache2 restart
Forcing reload of web server (apache2)...[Thu Jul 26 01:20:31 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Jul 26 01:20:31 2007] [error] VirtualHost *:80 -- mixing * ports and non-* ports with a NameVirtualHost address is not supported, proceeding with undefined results
[Thu Jul 26 01:20:31 2007] [warn] NameVirtualHost *:443 has no VirtualHosts
[Thu Jul 26 01:20:31 2007] [warn] NameVirtualHost *:80 has no VirtualHosts



mail4:/etc/apache2# cat conf.d/squirrelmail.conf
Alias /squirrelmail /usr/share/squirrelmail


# users will prefer a simple URL like http://webmail.example.com

NameVirtualHost *:80
<VirtualHost *:80>
 ServerName mail4.tmnet.se
 DocumentRoot /var/www
</VirtualHost>

<VirtualHost *:80>
  ServerName webmail4.tmnet.se
  RedirectMatch permanent .* https://webmail4.tmnet.se/
</VirtualHost>

NameVirtualHost *:443
<VirtualHost *:443>
 ServerName webmail4.tmnet.se:443
 DocumentRoot /usr/share/squirrelmail
 UseCanonicalName On
 SSLEngine on
 SSLCertificateFile /etc/apache2/ssl/apache.pem
 SSLCertificateKeyFile /etc/apache2/ssl/apache.pem
 SSLCipherSuite HIGH
 SSLProtocol all -SSLv2
#  Redirect / https://bar.example.org/

<Directory /usr/share/squirrelmail>
  Options Indexes FollowSymLinks
  <IfModule mod_php4.c>
    php_flag register_globals off
  </IfModule>
  <IfModule mod_php5.c>
    php_flag register_globals off
  </IfModule>
  <IfModule mod_dir.c>
    DirectoryIndex index.php
  </IfModule>

  # access to configtest is limited by default to prevent information leak
  <Files configtest.php>
    order deny,allow
    deny from all
    allow from 127.0.0.1
  </Files>
</Directory>

</VirtualHost>