Solution to the Pagoda site channeling problem. Accessing HTTPS without setting up an SSL site will open other sites under the server.

Original link: https://www.xujiahua.com/10107.html

When the server uses Pagoda Panel to build multiple websites, some sites without SSL will open other SSL sites on the same server when accessing HTTPS, causing the sites without SSL to be included by search engines such as Baidu or GOOGLE and other SSL sites. That is to say: when Pagoda creates site A, SSL and HTTPS are enabled, and other sites do not enable SSL. However, when accessing these sites without SSL through HTTPS, the content of site A is opened by default.

Let’s take a look at how netizens describe this issue:

Netizen A asks for help: I ​​added a domain name A to the server, and it automatically jumped to website B. This website B is in the same control panel but a different site. After I stop website B, domain name A will prompt that the site has been suspended. , and I deleted the domain name from the control panel and can still access it, but it is prompted that the site has been suspended. (SSL is enabled on website B and SSL is not enabled on website A)

Netizen B asks for help:

I added the second website yesterday through the Pagoda panel, and the DNS settings have taken effect. But now when I access the second domain name, it automatically jumps to the first website, whether it is the front or backend, causing me to be confused now. The source code has been deployed, but I cannot log in to the backend settings website. Is there something wrong with the settings? (The first website has SSL turned on, and the second website does not have SSL turned on, so it cannot be accessed regardless of the front or backend.)

Netizen C asks for help: A site that has not enabled SSL will directly access a site that has SSL enabled using HTTPS, and the site will be accessed. A website A is connected to https, and website B does not use SSL. However, when accessing using https, it will access the https of website A. How to solve this problem?

Netizen D asks for help:

I bound two domain names on the same VPS, then I used the Pagoda panel to create a new website A (using nginx) and configured SSL. However, when I visit my other domain name (without creating a website), it automatically jumps to website A. When using the CHROME browser, it prompts that the security certificate of this server comes from website A. How to solve it?

Netizen E asks for help:

A website A is connected to https, and website B does not use SSL. However, when accessing using https, it will access the https of website A. How to solve this problem?

………

There are many friends who have encountered this kind of problem, and they all ask different questions. In the final analysis, most of the reasons for this kind of “site-crossing” problem are: when the SSL default site is not specified, the use of HTTPS on sites that do not have SSL enabled will cause problems. Directly access sites with SSL enabled. The Pagoda official also has instructions on setting up the certificate, as shown below:

Solution:

1. When creating a new site, just use your own second-level domain name as the domain name (to avoid using it in the future). Please note that new sites do not require resolution.

2. By default, there will be index.html in the root directory of the corresponding site when you create a site. Delete it. The purpose is to make the site inaccessible

3. To enable the SSL certificate, you need to prepare an SSL certificate (even if it expires) and fill in the PEM and KEY

(Brother Diary searched on his VPS and randomly found a .key and .pem to import. After all, there are many websites on the VPS. At the same time, each website has also enabled Let’s Encrypt’s SSL certificate before, so the VPS will naturally There are quite a few of these .key .pem files)

4. Set the default site and select the new site you created.

In this way, if you use https to access a site without SSL enabled, the SSL site will not be enabled. There will be no problem of being indexed by search engines.

Please indicate when reprinting: Diary Boy’s Blog » Solution to the problem of pagoda site channeling. Accessing HTTPS without setting up an SSL site will open other sites under the server.

This article is reproduced from: https://www.xujiahua.com/10107.html
This site is only for collection, and the copyright belongs to the original author.