Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Web Server
  • Search

how to exclude certain subdomain from entire website HTTPS?

Questions regarding the Web Server
Apache + Nginx, Nginx + PHP5-FPM
Post Reply
  • Print view
Advanced search
6 posts • Page 1 of 1
baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

how to exclude certain subdomain from entire website HTTPS?
  • Quote

Post by baijianpeng » Thu Mar 10, 2016 9:57 am

My website had enabled HTTPS for entire site (SSL certificate is for *.domain.com ). But now, I need to exclude two subdomains, because those two subdomains are actually CNAME links to external resources, which do NOT allow accessing with HTTPS protocol.

How can I exclude those two subdomains from SSL when entire website had enabled HTTPS?

Thank you.
Top

Elizine
Posts: 50
Joined: Wed Aug 12, 2015 12:11 pm
Contact:
Contact Elizine
Website

Re: how to exclude certain subdomain from entire website HTTPS?
  • Quote

Post by Elizine » Fri Mar 11, 2016 10:05 am

Please try the following code -

Code: Select all

RewriteRule (.*)  https://www.mydomain.com$1 [R=301,L]
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: how to exclude certain subdomain from entire website HTTPS?
  • Quote

Post by baijianpeng » Fri Mar 11, 2016 10:42 am

I need to use HTTPS for ALL my URLs except:

Code: Select all

image.mydomain.com
file.mydomain.com
Your rewrite rule does not work.

Thank you.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: how to exclude certain subdomain from entire website HTTPS?
  • Quote

Post by tjebbeke » Fri Mar 11, 2016 1:53 pm

When you add the web domains image.mydomain.com and file.mydomain.com don't enable ssl/https.
Top

baijianpeng
Posts: 301
Joined: Tue Dec 22, 2015 2:06 pm

Re: how to exclude certain subdomain from entire website HTTPS?
  • Quote

Post by baijianpeng » Fri Mar 11, 2016 11:46 pm

When I tried to add new web record in VestaCP, there is no input box for subdomains. And, the IP address is fixed, I can not input other IP address.

But, my subdomain image.mydomain.com was linked to other IP address via CNAME record on my domain registration account.

Do you really understood my situation here?

Thank you.
Top

tjebbeke
Collaborator
Posts: 783
Joined: Mon May 11, 2015 8:43 am
Contact:
Contact tjebbeke
Website

Os: CentOS 6x
Web: apache + nginx
Re: how to exclude certain subdomain from entire website HTTPS?
  • Quote

Post by tjebbeke » Sat Mar 12, 2016 9:30 am

Subdomains are added similar to normal domains. It's normal that only the IP's assigned to your server are visible when you add your 'web domain'. If you add only your main domain and enable your SSL certificate, only that domain can be accessed over SSL.
Top


Post Reply
  • Print view

6 posts • Page 1 of 1

Return to “Web Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

cron

Login  •  Register

I forgot my password