Atualmente tenho o host virtual gerado automaticamente a partir do cpanel da seguinte forma:
<VirtualHost 162.144.xxx.xxx:443>
ServerName mydomain.com
ServerAlias mail.mydomain.com www.mydomain.com
DocumentRoot /home/mydomain/public_html
ServerAdmin [email protected]
UseCanonicalName Off
CustomLog /etc/apache2/logs/domlogs/mydomain.com combined
<IfModule log_config_module>
<IfModule logio_module>
CustomLog /etc/apache2/logs/domlogs/mydomain.com-bytes_log "%{%s}t %I .\n%{%s}t %O ."
</IfModule>
</IfModule>
## User sajadeal # Needed for Cpanel::ApacheConf
<IfModule userdir_module>
<IfModule !mpm_itk.c>
<IfModule !ruid2_module>
<IfModule !mod_passenger.c>
UserDir enabled sajadeal
</IfModule>
</IfModule>
</IfModule>
</IfModule>
# To customize this VirtualHost use an include file at the following location
# Include "/etc/apache2/conf.d/userdata/ssl/2_4/mydomain/mydomain.com/*.conf"
</VirtualHost>
Eu preciso remover o Documentroot dessa configuração. Eu quero fazer algo assim, não editando este arquivo, mas substituindo este arquivo:
<VirtualHost *:443>
ServerName example.com
ErrorLog /var/log/apache2/external-https_error.log
CustomLog /var/log/apache2/external-https_access.log combined
SSLCertificateFile /etc/ssl/example.com.crt
SSLCertificateKeyFile /etc/ssl/example.com.key
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:8080/
ProxyPassReverse / http://127.0.0.1:8080/
</VirtualHost>