Hello friends
I have a WHM with Lightspeed and CloudLinux installed on it, with many domains that I want to change default apache port for a specific domain of them on whm and get ssl certificate on new port.
According bellow link:
I make an include file on below path:
But i dont know what i have to write on it , i dont know the correct stracture as i got error when httprebuild with all of my test configuration on this file.
I use below configs:
And i got below error:
Can anybody knows exact syntax for this file?!
I have a WHM with Lightspeed and CloudLinux installed on it, with many domains that I want to change default apache port for a specific domain of them on whm and get ssl certificate on new port.
According bellow link:
PHP:
https://docs.cpanel.net/ea4/apache/modify-apache-virtual-hosts-with-include-files/?_ga=2.194081325.1691628398.1655314392-43255118.1653430806
I make an include file on below path:
PHP:
/etc/apache2/conf.d/userdata/ssl/2_4/user/domain/includename.conf
But i dont know what i have to write on it , i dont know the correct stracture as i got error when httprebuild with all of my test configuration on this file.
I use below configs:
PHP:
<VirtualHost 1.2.3.4:8788>
ServerName test.site.com
ServerAlias www.test.site.com
DocumentRoot /home/user/public_html/test
ServerAdmin [email protected]
UseCanonicalName Off
</VirtualHost>
And i got below error:
PHP:
# /usr/local/cpanel/scripts/rebuildhttpdconf
Initial configuration generation failed with the following message:
The “/usr/sbin/httpd -DSSL -t -f /etc/apache2/conf/httpd.conf.work.370b5997.cfgcheck -C Include "/etc/apache2/conf.modules.d/*.conf"” command (process 87546) reported error number 1 when it ended.
Configuration problem detected on line 0 of file /etc/apache2/conf.d/userdata/std/2_4/user/test.site.com/test.conf: Listen cannot occur within <VirtualHost> section
Rebuilding configuration without any local modifications.
Failed to generate a syntactically correct Apache configuration.
Bad configuration file located at /etc/apache2/conf/httpd.conf.work.370b5997
Error:
The “/usr/sbin/httpd -DSSL -t -f /etc/apache2/conf/httpd.conf.work.370b5997.cfgcheck -C Include "/etc/apache2/conf.modules.d/*.conf"” command (process 87548) reported error number 1 when it ended.
Configuration problem detected on line 0 of file /etc/apache2/conf.d/userdata/std/2_4/user/test.test.com/test.conf: Listen cannot occur within <VirtualHost> section
Can anybody knows exact syntax for this file?!