Coder Social home page Coder Social logo

Comments (3)

cloudpanel-io avatar cloudpanel-io commented on August 14, 2024

I don't see any problem. In the example below, the following redirections are working:

http://moby.io -> 301 --> https://www.moby.io
https://moby.io --> 301 --> https://www.moby.io
http://www.moby.io -> 301 --> https://www.moby.io

Can you please explain the issue more detailed?

server { listen 80; listen [::]:80; listen 443 ssl http2; listen [::]:443 ssl http2; {{ssl_certificate_key}} {{ssl_certificate}} server_name moby.io; return 301 https://www.moby.io$request_uri; }

server {
listen 80;
listen [::]:80;
listen 443 ssl http2;
listen [::]:443 ssl http2;
{{ssl_certificate_key}}
{{ssl_certificate}}
server_name www.moby.io www1.moby.io;
{{root}}

from cloudpanel-ce.

nemseck avatar nemseck commented on August 14, 2024

Thanks, what I meant is that on my Cloudpanel installation, by default, the first redirection part is missing.
So every time I create a new virtual host, I have to manually add:

server {
 listen 80;
  listen [::]:80;
  listen 443 ssl http2;
  listen [::]:443 ssl http2;
  {{ssl_certificate_key}}
  {{ssl_certificate}}
  server_name mylocaltest.mr;
  return 301 https://www.mylocaltest.mr$request_uri;
}

when in my local environment this part is automatically (and correctly) generated by default by Cloudpanel itself.

from cloudpanel-ce.

cloudpanel-io avatar cloudpanel-io commented on August 14, 2024

Cannot be reproduced.

from cloudpanel-ce.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.