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.

Problem ssl subdomain access Control Panel
#1
[Not Solved] Problem ssl subdomain access Control Panel
All works fine and SSL for domains perfect, but if i have this domain, for example www.test.com and add cp in DNS for example for create cp.test.com and access to my admin CP all works, yes, but in the moment i create SSL for admin CP, all fail, and when access control panel from Ip or from for example subdomain, redirect as index of domain www.test.com, really no sense.

For Fix this situation i restore backup of vhosts apache configuration and restart apache, and until running daemon delete SSL for subdomain access Control Panel as Admin, and this fix all, but i think there are some problem because i see the file of vhosts of configuration and show well.

I don´t know if know from Sentora Team what happend, thanks


Quote:# Configuration for Sentora control panel.
<VirtualHost *:443>
ServerAdmin info@test.com
DocumentRoot "/etc/sentora/panel/"
ServerName cp.test.com

<Directory "/etc/sentora/panel/">
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>

AddType application/x-httpd-php .php
#php_admin_value
open_basedir "/var/sentora/:/etc/sentora/"
php_admin_value sp.configuration_file "/etc/sentora/configs/php/sp/sentora.rules"

# PHP Admin Values
php_admin_value session.save_path "/var/sentora/sessions"

ErrorLog "/var/sentora/logs/sentora-error.log"
CustomLog "/var/sentora/logs/sentora-access.log" combined
CustomLog "/var/sentora/logs/sentora-bandwidth.log" common

ErrorDocument 500 /etc/static/errorpages/500.html
ErrorDocument 404 /etc/static/errorpages/404.html
ErrorDocument 403 /etc/static/errorpages/403.html
ErrorDocument 510 /etc/static/errorpages/510.html

# Custom settings are loaded below this line (if any exist)

</VirtualHost>
################################################################

# Configuration for Sentora control panel SSL.
<VirtualHost *:443>
ServerAdmin info@test.com
DocumentRoot "/etc/sentora/panel/"
ServerName cp.test.com

<Directory "/etc/sentora/panel/">
Options +FollowSymLinks -Indexes
AllowOverride All
Require all granted
</Directory>

AddType application/x-httpd-php .php
#php_admin_value
open_basedir "/var/sentora/:/etc/sentora/"
php_admin_value sp.configuration_file "/etc/sentora/configs/php/sp/sentora.rules"

# PHP Admin Values
php_admin_value session.save_path "/var/sentora/sessions"

ErrorLog "/var/sentora/logs/sentora-error.log"
CustomLog "/var/sentora/logs/sentora-access.log" combined
CustomLog "/var/sentora/logs/sentora-bandwidth.log" common

ErrorDocument 500 /etc/static/errorpages/500.html
ErrorDocument 404 /etc/static/errorpages/404.html
ErrorDocument 403 /etc/static/errorpages/403.html
ErrorDocument 510 /etc/static/errorpages/510.html

# Made from Sencrypt - letsencrypt - start

SSLEngine On
SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
SSLHonorCipherOrder on
SSLCipherSuite "ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305Big GrinHE-RSA-AES128-GCM-SHA256Big GrinHE-RSA-AES256-GCM-SHA384"
SSLCertificateFile /var/sentora/hostdata/zadmin/ssl/sencrypt/letsencrypt/cp.test.com/cert.pem
SSLCertificateKeyFile /var/sentora/hostdata/zadmin/ssl/sencrypt/letsencrypt/cp.test.com/private.pem
SSLCACertificateFile /var/sentora/hostdata/zadmin/ssl/sencrypt/letsencrypt/cp.test.com/chain.pem
# Made from Sencrypt - letsencrypt - end


# Custom settings are loaded below this line (if any exist)

</VirtualHost>
Reply
Thanks given by:
#2
[Not Solved] RE: Problem ssl subdomain access Control Panel
I identified the problem and tested it and it is that when putting ssl to the Sentora subdomain, the same entry with the same port is repeated in httpd-vhosts.conf twice as 443 instead of once with port 80 and once with port 443, Changed manually and restarted Apache, it is accessed perfectly with http and https for the subdomain, but when the daemon runs it again overwrites the subdomain with 443 twice, I don't know what solution could be given to this, greetings
Reply
Thanks given by:
#3
[Not Solved] RE: Problem ssl subdomain access Control Panel
(05-28-2024, 10:24 PM)franmm25 Wrote: I identified the problem and tested it and it is that when putting ssl to the Sentora subdomain, the same entry with the same port is repeated in httpd-vhosts.conf twice as 443 instead of once with port 80 and once with port 443, Changed manually and restarted Apache, it is accessed perfectly with http and https for the subdomain, but when the daemon runs it again overwrites the subdomain with 443 twice, I don't know what solution could be given to this, greetings

Hi franmm25,

I would be glad to help. If I may start with a few questions.

- Is this a fresh install?

- What version were you using before, If any?

- What version are you currently using? Your profile stats Zpanel 10.x. Sencrypt does not support Zpanel.

- Have you used another SSL manager module in the past? if so what module?

This issue normally happens when Sencrypt is installed and does not have the proper Sentora core files/DB installed.
Sencrypt requires Sentora v2.0.1+.
-Jettaman-

NEW: Sentora v.2.0.1 has been released!!!

Sentora's quick recovery depends on community support and donations. We need to stand as one and help Sentora into the future.

Donate HERE and do your part. We thank you for your support.
Reply
Thanks given by:
#4
[Not Solved] RE: Problem ssl subdomain access Control Panel
Install is fresh, reinstall OS and put Ubuntu, from here https://docs.sentora.org/?node=22

The last versión using Php 7.4.3, Sentora 2.0.1

Also i test in another server with fresh install han happend the same, only fail when install SSL for subdomain access CP, nothing more.

The problem is in vhost repeat the same port 2 times only for subdomain CP, is strange because the 2 configurations is ok and the only problem is repeat 443 in the first step, if you put 80 works, restart apache and works perfectly but when daemond tun overwrite all.

Actually i test in Ubuntu other time and continue the same, only can fix if delete SSL for subdomain, and dont install other module, etc, nothing more.

Regards.


Attached Files Thumbnail(s)
       
Reply
Thanks given by:
#5
[Not Solved] RE: Problem ssl subdomain access Control Panel
I think there may be a typo in the Sencrypt module (or apache admin module) where it is getting the port number from the over-ride port (443) and not the default apache port (80).

Looks to be a simple $variable change and it should work. Looking into it.
-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:
#6
[Not Solved] RE: Problem ssl subdomain access Control Panel
(05-29-2024, 09:48 PM)franmm25 Wrote: Install is fresh, reinstall OS and put Ubuntu, from here https://docs.sentora.org/?node=22

The last versión using Php 7.4.3, Sentora 2.0.1

Also i test in another server with fresh install han happend the same, only fail when install SSL for subdomain access CP, nothing more.

The problem is in vhost repeat the same port 2 times only for subdomain CP, is strange because the 2 configurations is ok and the only problem is repeat 443 in the first step, if you put 80 works, restart apache and works perfectly but when daemond tun overwrite all.

Actually i test in Ubuntu other time and continue the same, only can fix if delete SSL for subdomain, and dont install other module, etc, nothing more.

Regards.

franmm25,

Did you by chance install crr1969 PHP changer module or any other module? Your Apache_admin hook code is wrong. I have checked default install and all code is correct. Somehow your apache_admin mod code got changed.
-Jettaman-

NEW: Sentora v.2.0.1 has been released!!!

Sentora's quick recovery depends on community support and donations. We need to stand as one and help Sentora into the future.

Donate HERE and do your part. We thank you for your support.
Reply
Thanks given by:
#7
[Not Solved] RE: Problem ssl subdomain access Control Panel
(05-30-2024, 06:08 AM)Jettaman Wrote: @[franmm25],

Did you by chance install crr1969 PHP changer module or any other module? Your Apache_admin hook code is wrong. I have checked default install and all code is correct. Somehow your apache_admin mod code got changed.

Yes i use this module :

Quote:<?xml version="1.0" encoding="utf-8"?>
<module>
    <name>Php_Ver</name>
    <version>100</version>
    <defaultcat>Domain Management</defaultcat>
    <type>user</type>
    <desc>This module enables you to change or configure Php versions on your Domains.</desc>
    <authorname>ccr1969</authorname>
    <authoremail>webmaster@idohost.cf</authoremail>
    <authorurl>https://idohost.cf/</authorurl>
    <updateurl>http://idohost.cf/version.xml</updateurl>
</module>


Also Module Change Php Version add some lines inside vhosts as these :

Quote:<Files ~ "\.php$">
SetHandler "proxy:unix:/run/php/php5.6-fpm.sock|fcgi://localhost/"
</Files>

And i add these lines for specific folder with other Php versión, from Apache Module in Sentora only for some domains :

Quote:<Directory /var/sentora/hostdata/zadmin/public_html/test_com/tester_version>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost/"
</FilesMatch>
</Directory>

Apache Modules :

Code:
access_compat_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
bw_module (shared)
core_module (static)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
http_module (static)
Loaded Modules:
log_config_module (static)
logio_module (static)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
proxy_fcgi_module (shared)
proxy_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
so_module (static)
ssl_module (shared)
status_module (shared)
unixd_module (static)
version_module (static)
watchdog_module (static)

The module and all works fine, the only problem is with SSL for subdomain access CP, regards.
Reply
Thanks given by:
#8
[Not Solved] RE: Problem ssl subdomain access Control Panel
(05-30-2024, 06:15 AM)franmm25 Wrote: Yes i use this module :



Also Module Change Php Version add some lines inside vhosts as these :


And i add these lines for specific folder with other Php versión, from Apache Module in Sentora only for some domains :


Apache Modules :

Code:
access_compat_module (shared)
auth_basic_module (shared)
authn_core_module (shared)
authn_file_module (shared)
authz_core_module (shared)
authz_host_module (shared)
authz_user_module (shared)
autoindex_module (shared)
bw_module (shared)
core_module (static)
deflate_module (shared)
dir_module (shared)
env_module (shared)
filter_module (shared)
http_module (static)
Loaded Modules:
log_config_module (static)
logio_module (static)
mime_module (shared)
mpm_prefork_module (shared)
negotiation_module (shared)
php7_module (shared)
proxy_fcgi_module (shared)
proxy_module (shared)
reqtimeout_module (shared)
rewrite_module (shared)
setenvif_module (shared)
socache_shmcb_module (shared)
so_module (static)
ssl_module (shared)
status_module (shared)
unixd_module (static)
version_module (static)
watchdog_module (static)

The module and all works fine, the only problem is with SSL for subdomain access CP, regards.

franmm25,

THAT'S THE ISSUE!!!! CCR1969's PHP changer mod is obsolete with sentora v2.0.1+ core code/files.
He has made changes that no longer work with the new core/files. In his install he replaces main core files to make his module work.

We need to get your system back to default v2.0.1 core files.

Follow these steps below and run commands as ROOT -

Code:
setso --set apache_changed "1717016703"

Code:
setso --set panel_ssl_tx ""

Code:
setso --set apache_port "80"

Code:
setso --set sentora_port "80"

Code:
setso --set dbversion "2.0.0"

Code:
bash <(curl -L -Ss https://sentora.org/update_2.0.1)

This should reset your core and default you back to v2.0.1.

Let me know if you have any issues after you run the following commands. Talk soon.
-Jettaman-

NEW: Sentora v.2.0.1 has been released!!!

Sentora's quick recovery depends on community support and donations. We need to stand as one and help Sentora into the future.

Donate HERE and do your part. We thank you for your support.
Reply
Thanks given by:
#9
[Not Solved] RE: Problem ssl subdomain access Control Panel
(05-30-2024, 07:32 AM)Jettaman Wrote: @[franmm25],

THAT'S THE ISSUE!!!! CCR1969's PHP changer mod is obsolete with sentora v2.0.1+ core code/files.
He has made changes that no longer work with the new core/files. In his install he replaces main core files to make his module work.

We need to get your system back to default v2.0.1 core files.

Follow these steps below and run commands as ROOT -

Code:
setso --set apache_changed "1717016703"

Code:
setso --set panel_ssl_tx ""

Code:
setso --set apache_port "80"

Code:
setso --set sentora_port "80"

Code:
setso --set dbversion "2.0.0"

Code:
bash <(curl -L -Ss https://sentora.org/update_2.0.1)

This should reset your core and default you back to v2.0.1.

Let me know if you have any issues after you run the following commands. Talk soon.


Thanks, and yes, this fix all for this situation, but how i can use fpm, for change version of php because until always can put different version for each domain include in each folder

Quote:<Files ~ "\.php$">
SetHandler "proxy:unix:/run/php/php5.6-fpm.sock|fcgi://localhost/"
</Files>

<Directory /var/sentora/hostdata/zadmin/public_html/test_com/test2>
<FilesMatch \.php$>
SetHandler "proxy:unix:/run/php/php7.3-fpm.sock|fcgi://localhost/"
</FilesMatch>
</Directory>


And is strange because now no have the module for change php version, but i can continue change to php version 5.6, but don´t let me change in folders, for me is the same the module, but in Centos 7 i change this with only install fpm but at the moment no works for me in Ubuntu, if i can install this and others php versions can change manually the version in Apache vhosts and overwrite, and don´t give problems.

Is possible solution for this, thank´s for all your help, regards
Reply
Thanks given by:


Possibly Related Threads…
Thread Author Replies Views Last Post
Problem Install Sentora 2.0.1 franmm25 11 3 ,106 06-24-2024, 10:53 AM
Last Post: TGates
SSL problem fresh install franmm25 0 564 06-02-2024, 10:26 AM
Last Post: franmm25
Problem for Install in Centos franmm25 1 1 ,917 04-09-2023, 12:45 AM
Last Post: TGates

Forum Jump:


Users browsing this thread: 1 Guest(s)