wikidiffs at apache
Mar 11, 2012, 4:27 PM
Post #1 of 1
Dear Wiki user,
[Httpd Wiki] Update of "ExampleVhosts" by Sling
You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.
The "ExampleVhosts" page has been changed by Sling:
updated to 2.4, added full ssl configuration and reference to SNI article
## page was renamed from Recipies/ExampleVhosts
= Example VirtualHost Configurations =
- The excerpts below show some example name-based !VirtualHost configurations that can be used in Apache.
+ The excerpts below show some example name-based !VirtualHost configurations that can be used in Apache. For more detailed instructions, please see the [[http://httpd.apache.org/docs/2.4/vhosts/|official documentation]].
- For each TCP port that you want to use to serve content, you will need to define these before configuring your !VirtualHosts.
+ For each TCP port that you want to use to serve content, you will need to define a Listen directive before configuring your !VirtualHosts.
+ When using Apache version 2.2.x or lower, each port will also need a NameVirtualHost directive.
- You will need both a Listen directive and a !NameVirtualHost directive.
# This tells Apache to listen on port 80
- # This tells Apache to listen on port 443
+ # This tells Apache to listen on port 443 (Only required when using SSL)
# This tells Apache that you will be using name-based vhosts on port 80
+ # Note: Only required when using Apache version 2.2.x or lower
@@ -82, +82 @@
== SSL-enabled VirtualHost with custom log files ==
- <VirtualHost _default_:443>
+ <VirtualHost *:443>
- # Only one virtual host allowed on this port, because name-based
- # virtual hosting doesn't work with SSL
CustomLog /var/log/apache/www.foo.com-access.log combined
+ # Example SSL configuration
- SSLEngine On
+ SSLEngine on
+ SSLProtocol all -SSLv2
+ SSLCipherSuite HIGH:MEDIUM:!aNULL:!MD5
+ SSLCertificateFile "/var/www/www.foo.com/ssl/server.crt"
+ SSLCertificateKeyFile "/var/www/www.foo.com/ssl/server.key"
+ Warning: If you want to run multiple SSL vhosts on a single IP, see [[http://wiki.apache.org/httpd/NameBasedSSLVHostsWithSNI|this article]].
To unsubscribe, e-mail: docs-unsubscribe [at] httpd
For additional commands, e-mail: docs-help [at] httpd