Control Web Panel

WebPanel => Apache => Topic started by: fysioski on May 26, 2023, 11:37:52 AM

Title: /usr/local/apache/conf.d/vhosts/domain.ssl.conf gets overwritten
Post by: fysioski on May 26, 2023, 11:37:52 AM
When we make a custom conf like /usr/local/apache/conf.d/vhosts/testdomain.nl.ssl.conf it gets overwritten and reset to default. How can we make custom config files so that they won't be overwritten?
Title: Re: /usr/local/apache/conf.d/vhosts/domain.ssl.conf gets overwritten
Post by: overseer on May 26, 2023, 10:29:29 PM
Code: [Select]
sudo chattr +i /usr/local/apache/conf.d/vhosts/testdomain.nl.ssl.confto make changes, remove the immutable bit:
Code: [Select]
sudo chattr -i /usr/local/apache/conf.d/vhosts/testdomain.nl.ssl.conf
Title: Re: /usr/local/apache/conf.d/vhosts/domain.ssl.conf gets overwritten
Post by: cyberspace on May 27, 2023, 10:16:25 PM
It looks like you customize the apache conf file generated by CWP. If so then CWP reset all HTTP/HTTPS (nginx/apache) confs according to the used templates.

To solve this I recommend you to create a custom template and apply it for your website testdomain.nl.

Please review the page:
https://wiki.centos-webpanel.com/webservers-vhost-templates
to learn about webserver vhost templates.

Hope it will help you to solve the problem.

Title: Re: /usr/local/apache/conf.d/vhosts/domain.ssl.conf gets overwritten
Post by: fysioski on June 01, 2023, 02:41:56 PM
I created a new vhost file client-ssl.conf as a nginx vhost. Where can I apply that new vhost file to the domain? As it does not show in the dropdown. Maybe i look at the wrong place. I looked at the documentation but I might look at wrong place. I can make screenshots if you like?