Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Syntax error on line 29 of /etc/apache2/sites-enabled/001-example.conf:
- <VirtualHost not allowed here
- Action 'start' failed.
- Define server_name example.com
- Define home_name example
- Define group_name www-data
- Define has_ssl 1
- Define has_phpmyadmin 1
- <VirtualHost *:80>
- ServerName ${server_name}
- ServerAlias www.${server_name}
- DocumentRoot /home/${home_name}/public_html
- ErrorLog ${APACHE_LOG_DIR}/error.${server_name}.log
- CustomLog ${APACHE_LOG_DIR}/access.${server_name}.log combined
- SuexecUserGroup ${home_name} ${group_name}
- <Directory /home/${home_name}/public_html>
- Require all granted
- AllowOverride All
- </Directory>
- # Redireccionar a httpsa
- <If "${has_ssl} == '1'">
- Redirect permanent / https://${server_name}/
- </If>
- </VirtualHost>
- <If "${has_ssl} == '1'">
- <VirtualHost *:443>
- ServerName ${server_name}
- ServerAlias www.${server_name}
- DocumentRoot /home/${home_name}/public_html
- ErrorLog ${APACHE_LOG_DIR}/error.${server_name}.log
- CustomLog ${APACHE_LOG_DIR}/access.${server_name}.log combined
- SSLEngine on
- SSLCertificateFile /etc/letsencrypt/live/${server_name}/cert.pem
- SSLCertificateKeyFile /etc/letsencrypt/live/${server_name}/privkey.pem
- SSLCertificateChainFile /etc/letsencrypt/live/${server_name}/chain.pem
- SuexecUserGroup ${home_name} ${group_name}
- <Directory /home/${home_name}/public_html>
- Require all granted
- AllowOverride All
- </Directory>
- </VirtualHost>
- </If>
- <If "${has_phpmyadmin} == '1'">
- Include /etc/phpmyadmin/apache.conf
- </If>
Add Comment
Please, Sign In to add comment