Last active
February 13, 2020 12:59
-
-
Save anilnautiyal/8778012517a278590a3ced61b614c48c to your computer and use it in GitHub Desktop.
VirtualHost Conf File
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerName example.com | |
ServerAlias www.example.com | |
DocumentRoot /home/user/example.com/public/ | |
<Directory /home/user/example.com/public/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
CustomLog /var/log/apache2/example.com-access.log forwarded | |
ErrorLog /var/log/apache2/example.com-error.log | |
# Possible values include: debug, info, notice, warn, error, crit, | |
# alert, emerg. | |
LogLevel warn | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName example.com | |
ServerAlias www.example.com | |
DocumentRoot /home/user/example.com/public/ | |
<Directory /home/user/example.com/public/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
CustomLog /var/log/apache2/example.com-access.log combined | |
ErrorLog /var/log/apache2/example.com-error.log | |
# Possible values include: debug, info, notice, warn, error, crit, | |
# alert, emerg. | |
LogLevel warn | |
SSLEngine on | |
SSLCertificateFile /etc/letsencrypt/live/example.com/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/example.com/privkey.pem | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment