Saminnet-Search Article Wiki Forum Piwigo SNS Cloud vtiger Sugar
2 domains with 1 IP

  • Data-Articles
    • Systemd update (55) Fri01,15:46pm

      CentOS7でSystemdがメモリリークしていて使用率がジワジワと上昇していたCentOSほとんどサービス動いてないサーバが急にメモリ使用率の警告出したので調べて見たら、1日に30MBくらい、1ヵ月で1GBくらいジワジワとSystemdがメモリリークしていたという話です。 事象Systemdが異常にメモリを使っている。 $ ps aux | headUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDroot 1 0.2 60.9 2327496 2207392 ? Ss 1月15 191:31 /usr/lib/systemd/systemd --switched-root --system --deserialize 21root 2 0.0 0.0 0 0 ? S 1月15 0:00 [kthreadd]...何…

      Read More...

2 domains with 1 IP

Hosting several name-based virtual hosts accessible trough HTTPS requires you to enable mod_ssl and add a similar configuration as in the example above:
Listen 443
NameVirtualHost *:443
# Accept connections for these vhosts from non-SNI clients
# Clients without SNI will be handled by the first defined vhost.
# If you only want SNI-enabled client, put on instead
SSLStrictSNIVHostCheck off
<VirtualHost *:443>
ServerName www.yourfirstdomain.tld
DocumentRoot /www/yourfirstdomain.tld/
</VirtualHost>
<VirtualHost *:443>
ServerName www.yourseconddomain.tld
DocumentRoot /www/yourseconddomain.tld/
</VirtualHost>

Remember that using SSL requires you to buy SSL certificates for you domains - or to generate some auto-signed ones, and to configure Apache to use them for SSL connections.
Apache2 supports serving different contents depending on domain names, even if all those domains resolve to the same IP address. Each of the domain names is handled by a virtual host, thus the name name-based virtual host.
Here is a sample configuration for two domains:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName www.yourfirstdomain.tld
DocumentRoot /www/yourfirstdomain.tld/
</VirtualHost>
<VirtualHost *:80>
ServerName www.yourseconddomain.tld
DocumentRoot /www/yourseconddomain.tld/
</VirtualHost>

You will find the official documentation on name-based virtual host support here.

Add comment


Articles by Date

TweetTweet Share on LinkedInShare on LinkedIn Share on Google+Google+ Submit to RedditReddit Publish on WordPress WordPress Send emailSend email