User Tools

Site Tools


apache:virtual_hosts

This is an old revision of the document!


Apache - Virtual Hosts

/etc/apache/sites-available/example.com
# domain: example.com
# public: /home/myhomefolder/public/example.com/
 
<VirtualHost actual_dedicated_ip:80>
  # Admin email, Server Name (domain name), and any aliases
  ServerAdmin admin@example.com
  ServerName  www.example.com
  ServerAlias example.com
  Redirect permanent / https://www.example.com/
  # Index file and Document Root (where the public files are located)
  DirectoryIndex index.html index.php
  DocumentRoot /home/myhomefolder/public/example.com/public
 
  # Log file locations
  LogLevel warn
  ErrorLog  /home/myhomefolder/public/example.com/log/error.log
  CustomLog /home/myhomefolder/public/example.com/log/access.log combined
</VirtualHost>
<VirtualHost actual_dedicated_ip:443>
     SSLEngine On
     SSLProtocol ALL -SSLv2 -SSLv3
     SSLHonorCipherOrder On
     SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+3DES:!aNULL:!MD5:!DSS
     SSLCertificateFile /etc/apache2/ssl/www.example.com.crt
     SSLCertificateKeyFile /etc/apache2/ssl/www.example.com.key
     SSLCertificateChainFile /etc/apache2/ssl/www.example.com.ca-bundle
     <Directory /home/myhomefolder/public/example.com/public>
       Require all granted
       AllowOverride ALL
     </Directory>     
     ServerAdmin admin@example.com
     ServerName example.com
     DocumentRoot /home/myhomefolder/public/example.com/public
     ErrorLog /home/myhomefolder/public/example.com/log/https_error.log
     CustomLog /home/myhomefolder/public/example.com/log/https_access.log combined
</VirtualHost>
apache/virtual_hosts.1476144467.txt.gz · Last modified: 2020/07/15 09:30 (external edit)

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki