Webinoly is just the perfect tool for NGINX experts. Give it a try!
0 votes
904 views
by
Hello.

I have use force none-www and ssl.  but have a issue.

www.myweb.com/page1 .   ------> .    https://myweb.com/page1 .   OK.
https://www.myweb.com/page1 .   ------> .    https://myweb.com/page1 .   OK.
myweb.com/page1 .   ------> .    https://myweb.com .   Not ok. no page1 on url but redirect to home page.

Can you help me fix it?

Thank you.
by

All default config.
 

# WebinolySSLredirectStart - HTTP to HTTPS Redirect

server {

        listen 80;

        listen [::]:80;

        server_name domain.com www.domain.com;

        return 301 https://$host$request_uri;

}

# WebinolySSLredirectEnd

# WebinolyWWWredirectStart - Force WWW or non-WWW redirect

server {

        listen 443 ssl http2;

        listen [::]:443 ssl http2;

        server_name www.domain.com;

        # WebinolySSLstart

        ssl on;

        ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;

        ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;

        ssl_stapling on;

        ssl_stapling_verify on;

        ssl_trusted_certificate /etc/letsencrypt/live/domain.com/chain.pem;

        # WebinolySSLend

        include common/headers-http.conf;

        include common/headers-https.conf;

        return 301 $scheme://domain.com$request_uri;

}

# WebinolyWWWredirectEnd

# WebinolyNginxServerStart

server {

        listen 443 ssl http2;

        listen [::]:443 ssl http2;

        server_name domain.com;

        # WebinolySSLstart

        ssl on;

        ssl_certificate /etc/letsencrypt/live/domain.com/fullchain.pem;

        ssl_certificate_key /etc/letsencrypt/live/domain.com/privkey.pem;

1 Answer

0 votes
by Expert
Everything is OK in your Nginx configuration, redirections should be working as expected.

Maybe you are having issue with cache in your browser.

Can you try a different browser?

Regards.
by

You are right. work best in different browser and other PC.  lol.

You are the best.  Thank You

Welcome to the Community site for Webinoly.

Our Optimized LEMP Web Server is a powerful set of commands for doing just about anything you could wish.

With Webinoly you can set up your NGINX web server in just one step.

* * * * * * *

To report a bug, please create a new issue on GitHub or ask a question here with the bug tag.
Webinoly Support Paypal Donations

PayPal · GitHub Sponsors · Bitcoin

It is very important that any visitor to the site read the disclaimer, terms of use and privacy and legal statement before start browsing.

...