Sponsor:

Server and Web Integrator
Link:
Kloxo-MR logo
6.5.0 or 7.0.0
Click for "How to install"
Donation/Sponsorship:
Kloxo-MR is open-source.
Donate and or Sponsorship always welcome.
Click to:
Click Here
Please login or register. 2024-04-28, 00:15:26

Author Topic: SSL with my domain and subdomains problem  (Read 4374 times)

0 Members and 1 Guest are viewing this topic.

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
SSL with my domain and subdomains problem
« on: 2015-08-29, 03:35:27 »
Hello,

I'm having an issue and I have no idea how to fix it let's call the domain: mydomain.com

So basically I have a SSL cert for mydomain.com and is NOT a wildcard cert so I just want to use it on mydomain.com and not on subdomain.domain.com. I added the cert for my main domain on Domains -> mydomain.com -> ssl certificates. It works as it should. But then I added a few other subdomains.mydomain.com and when I try to open on my browser it automatically redirects from http://subdomain.mydomain.com to https://subdomain.mydomain.com

When I added the subdomains I disabled the option "enable ssl" so no idea why is redirecting http:// to https://

I also have the SSL cert on the kloxo-mr panel.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: SSL with my domain and subdomains problem
« Reply #1 on: 2015-08-29, 03:42:06 »
Inform here your 'sh /script/sysinfo'.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: SSL with my domain and subdomains problem
« Reply #2 on: 2015-08-29, 03:48:33 »
Here it goes:

Code: [Select]
A. Kloxo-MR: 7.0.0.b-2015081601
   - Web: hiawatha-9.14.0-f.6.mr.el6.i386
   - PHP: php54s-5.4.44-1.w6 (cgi mode)
B. Plateform:
   - OS: CentOS release 6.7 (Final) i686
   - Hostname: domain.com
C. Services:
   1. MySQL: MariaDB-server-10.0.21-1.el6.i686
   2. PHP:
      - Branch: php54-cli-5.4.44-1.ius.el6.i686
      - Used: --Use PHP Branch--
   3. Httpd: httpd24u-2.4.16-2.ius.el6.i686
      - PHP Type: php-fpm_event
   4. Lighttpd: --uninstalled--
   5. Hiawatha: --unused--
   6. Nginx: --uninstalled--
   7. Cache: --uninstalled--
   8. Dns: --uninstalled--
   9. Qmail: qmail-toaster-1.03-1.3.55.mr.el6.i386
      - with: courier-imap-toaster-4.1.2-1.3.18.mr.el6.i386
D. Memory:
                total       used       free     shared    buffers     cached
   Mem:           2048        470        1577          6          0        180
   -/+ buffers/cache:        248        1799
   Swap:          1024          0        1024
E. Disk Space:
   Filesystem      Size  Used Avail Use% Mounted on
   /dev/simfs      100G   42G   59G  42% /
« Last Edit: 2015-08-29, 06:22:55 by tega »

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: SSL with my domain and subdomains problem
« Reply #3 on: 2015-08-29, 03:54:42 »
Is not issue/problem with php?.

What's about httpd 2.2, nginx-proxy or other?.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: SSL with my domain and subdomains problem
« Reply #4 on: 2015-08-29, 04:12:00 »
I did a new fresh installation of kloxo-mr yesterday on the new server, is pretty much all default.

I need to use apache 2.4, but I can try other webservers.

I just noticed is not only on subdomains, it's ALL the domains I have added on kloxo-mr, even the ones in different clients that are redirecting from http:// to https://

I went on /opt/configs/apache/conf/domains and in every domain I have this (that use the port 80):

Code: [Select]
<VirtualHost ${ip}:${port} >

SetEnvIf X-Forwarded-Proto https HTTPS=1

is this the thing that is causing the redirect from the port 80 to 443? I've not changed any of the files, I'm an enthusiast not a sysadmin, so I apologize if I said something stupid.

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: SSL with my domain and subdomains problem
« Reply #5 on: 2015-08-29, 04:42:31 »
Ip and port for 'default' value declare in /opt/configs/apache/conf/defaults/init.conf
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: SSL with my domain and subdomains problem
« Reply #6 on: 2015-08-29, 20:27:03 »
That's what I have. tried to replace * for the IP but same thing. No idea why is every domain that I added on kloxo automatically redirecting from http:// to https://

Code: [Select]
<IfVersion < 2.4>
Define global::port 80
Define global::portssl 443
Define global::ip *

Define port ${global::port}
Define portssl ${global::portssl}
Define ip ${global::ip}
</IfVersion>

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: SSL with my domain and subdomains problem
« Reply #7 on: 2015-08-30, 03:29:40 »
As I know still many issue related to httpd 2.4.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: SSL with my domain and subdomains problem
« Reply #8 on: 2015-08-30, 19:00:22 »
The thing is on /opt/config/apache/conf/mydomain.conf kloxo-mr keeps assigning the IP address to the virtual hosts
Code: [Select]
Define ipalloc xxx.xxx.xxx.xxx
And the only way I have to make everything working correctly is assigning the wildcard,
Code: [Select]
Define ipalloc *
With that is working perfectly all over the server, but everytime I do sh /script/fixweb or add a new domain to kloxo-mr it reverts to Define ipalloc xxx.xxx.xxx.xxx on the conf file.

I left it working perfectly yesterday and today when I woke up, every domain on kloxo-mr was again redirecting to the same domain

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: SSL with my domain and subdomains problem
« Reply #9 on: 2015-08-30, 19:14:56 »
By default ipalloc is '*' (wildcards). If you only have 1 IP, don't assign this IP to certain domain.
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline tega

  • Valuable Member
  • *
  • Posts: 56
  • Karma: +0/-0
    • View Profile
Re: SSL with my domain and subdomains problem
« Reply #10 on: 2015-08-30, 19:46:36 »
Ok thanks.

And just a quick bug report, when you assign httpd when I choose apache, there's a bug on the daemon (2.2 or 2.4 have the same issue).
I discovered when doing: service httpd restart or stop it always shown as "failed" (since sh /script/restart-web uses the same command).

So basically on the file /etc/init.d/httpd where it shows the pid file it has this on the line 45:
Code: [Select]
pidfile=${PIDFILE-/var/run/httpd.pid}
But it should be:
Code: [Select]
pidfile=${PIDFILE-/var/run/httpd/httpd.pid}
I know is not a kloxo-mr issue, but you should make a script to fix that or changing service httpd restart to apachectl restart on the /script/restart-web

 


Top 4 Global Search Engines:    Google    Bing    Baidu    Yahoo
Click Here

Page created in 0.031 seconds with 21 queries.

web stats analysis