This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
#1
what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
Hello,
I'm trying to trace the origin of a file that always reconfigures my /etc/sentora/configs/apache/httpd-vhosts.conf file everytime I add or remove a domain.
Interestingly, I also suspended a client and got the same error.

There are two problems that I get:
  1. It edits the SSL entry for Sentora Control Panel in the referenced file with "NameVirtualHost *:443" instead of <VirtualHost *:443>. This causes errors and apache fails to reload.
  2. It reverts the DocumentRoot to "/etc/Sentora/panel/" which should be "/etc/sentora/panel/" and generates the second error.
I've attached a screenshot (first pic) that shows the two lines in question. 

I currently workaround it using the following steps (second pic):
  1. Close the first opened VirtualHost with </VirtualHost> before the NameVirtualHost entry.
  2. I open a new <VirtualHost *:443>
  3. I then comment out NameVirtualHost mentioned in the first error/problem I mentioned above.
  4. I then replace the capital S with a smaller one in the second problem mentioned above.
  5. I reload apache2 with the command "service apache2 restart" and all is done.
Anyone who can help with any pointers will help me go a long way.


Attached Files Thumbnail(s)
       
***********************************************
SAMUEL AVOLA MUNGUJAKISA         *
CEO, Bero Computers                         *
www.berocomputers.com          *
+256754086797                           *
+256780585402                     *
*****************************  *
Reply
Thanks given by:
#2
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
mungujakisa,

Look at /var/sentora/backups there you find the VHOST files that will be placed by the cron job that testing Apache.
Work with the Sentora panel. Don't mess with httpd-vhost.conf files.
Reply
Thanks given by:
#3
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
(08-10-2018, 04:49 AM)inkoop@topmatica.nl Wrote: mungujakisa,

Look at /var/sentora/backups there you find the VHOST files that will be placed by the cron job that testing Apache.
Work with the Sentora panel. Don't mess with httpd-vhost.conf files.

Thanks inkoop@topmatica.nl, I've looked through but still not found a solution to my problem. I've looked through each and every file in the backup folder you mentioned, and they are exactly the way I edited them, I know because I simply commented out the offending line in the original file.
My problem is that if I add or remove a domain or suspend a client, the file will be edited with the NameVirtualHost entry which will render all my websites inaccessible.

I know not to mess with apache files, but I have no option at the moment. By the way, I only started messing with them when Sentora panel caused these errors...

Thanks.
***********************************************
SAMUEL AVOLA MUNGUJAKISA         *
CEO, Bero Computers                         *
www.berocomputers.com          *
+256754086797                           *
+256780585402                     *
*****************************  *
Reply
Thanks given by:
#4
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
The file that creates the httpd-vhosts.conf file is this one: https://github.com/sentora/sentora-core/...n.hook.php

We do know it needs to be updated for sites that use SSL (Remove SSL entries and just show non-ssl expired/exceeded/etc. page or keep SSL entries and show the expired/exceeded/etc. page)
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by: mungujakisa
#5
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
Thanks TGates, your direction helped me to solve this mystery. Apparently SSL added the erronous lines as a global entry and this file was faithfully replicating it everytime I added a new domain or removed one. I don't know if it's the certificate manager that did this or Lets Encrypt that I was testing. I corrected the errors in the global entry via Sentora panel and now all is well!
Another mystery I have to resolve is why apache needs a reboot like every three to four days, it just gets an error and shows a database connection error.

Have a blessed day!
***********************************************
SAMUEL AVOLA MUNGUJAKISA         *
CEO, Bero Computers                         *
www.berocomputers.com          *
+256754086797                           *
+256780585402                     *
*****************************  *
Reply
Thanks given by:
#6
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
(08-11-2018, 03:45 PM)mungujakisa Wrote: Thanks TGates, your direction helped me to solve this mystery. Apparently SSL added the erronous lines as a global entry and this file was faithfully replicating it everytime I added a new domain or removed one. I don't know if it's the certificate manager that did this or Lets Encrypt that I was testing. I corrected the errors in the global entry via Sentora panel and now all is well!
Glad that helped you to solve your issue!
(08-11-2018, 03:45 PM)mungujakisa Wrote: Another mystery I have to resolve is why apache needs a reboot like every three to four days, it just gets an error and shows a database connection error.
That is odd. Apache shouldn't shut down because of a MySQL issue. Are you sure MySQL is not shutting down? Have you checked your available disk space? The logs can get very large and eat up a lot of storage space which will cause MySQL to crash.

Check the MySQL log, apache log and syslog to help you find out what is going on.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#7
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
(08-12-2018, 04:36 AM)TGates Wrote: Glad that helped you to solve your issue!
That is odd. Apache shouldn't shut down because of a MySQL issue. Are you sure MySQL is not shutting down? Have you checked your available disk space? The logs can get very large and eat up a lot of storage space which will cause MySQL to crash.

Check the MySQL log, apache log and syslog to help you find out what is going on.

The errors just happened again, and the error files are slim. I had to reboot the whole server for my websites to come back online.


Attached Files Thumbnail(s)
       
***********************************************
SAMUEL AVOLA MUNGUJAKISA         *
CEO, Bero Computers                         *
www.berocomputers.com          *
+256754086797                           *
+256780585402                     *
*****************************  *
Reply
Thanks given by:
#8
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
Did you check how much free space is on your hard drive? It sounds like the drive is full which in turn will shut down MySQL.
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:
#9
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
(08-16-2018, 06:48 AM)TGates Wrote: Did you check how much free space is on your hard drive? It sounds like the drive is full which in turn will shut down MySQL.

I have lots of space, more than 400G free of my 500G available as seen in the attached screenshot.
This happens like once every week or so.


Attached Files Thumbnail(s)
   
***********************************************
SAMUEL AVOLA MUNGUJAKISA         *
CEO, Bero Computers                         *
www.berocomputers.com          *
+256754086797                           *
+256780585402                     *
*****************************  *
Reply
Thanks given by:
#10
RE: what files edit /etc/sentora/configs/apache/httpd-vhosts.conf
Outside of drive space, I am not sure what would cause this on a 'regular' basis. Hopefully somebody else has more things for you to check. Huh
-TGates - Project Council

SEARCH the Forums or read the DOCUMENTATION before posting!
Support Sentora and Donate: HERE

Find my support or modules useful? Donate to TGates HERE
Developers and code testers needed!
Contact TGates for more information
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Is Sentora dead? rajeevrrs 2 2 ,880 12-17-2022, 09:20 AM
Last Post: TGates
Sentora debug and error files johnnyp 0 1 ,099 10-27-2022, 06:16 PM
Last Post: johnnyp
Transfer Account to another Sentora BenI 1 2 ,488 07-21-2022, 07:19 PM
Last Post: Nigel

Forum Jump:


Users browsing this thread: 1 Guest(s)