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-05-02, 03:08:38

Author Topic: Redirect to SSL with Nginxproxy  (Read 3073 times)

0 Members and 1 Guest are viewing this topic.

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Redirect to SSL with Nginxproxy
« on: 2015-09-06, 00:06:39 »
Trying to use .htaccess to redirect to SSL site, but i get too many redirects, why? Works with Apache alone.
I use:
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
Kloxo-MR!

Offline MRatWork

  • Administrator
  • The Elite
  • *****
  • Posts: 15,807
  • Karma: +119/-11
  • Gender: Male
    • View Profile
    • MRatWork Forum
Re: Redirect to SSL with Nginxproxy
« Reply #1 on: 2015-09-06, 05:25:19 »
Trying to use .htaccess to redirect to SSL site, but i get too many redirects, why? Works with Apache alone.
I use:
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
In nginx-proxy, access to port 443 handle by nginx where nginx to apache always use port 30080
..:: MRatWork (Mustafa Ramadhan Projects) ::..
-- Server/Web-integrator - Web Hosting (Kloxo-MR READY!) --

Offline fossxplorer

  • Master
  • **
  • Posts: 640
  • Karma: +1/-0
    • View Profile
Re: Redirect to SSL with Nginxproxy
« Reply #2 on: 2015-09-06, 12:57:57 »
Yeah, i'm aware of that. But why doesn't a redirect inside .htaccess work? It looks like the condition
RewriteCond %{HTTPS} !=on isn't respected hence it goes into a loop.

Trying to use .htaccess to redirect to SSL site, but i get too many redirects, why? Works with Apache alone.
I use:
<IfModule mod_rewrite.c>
RewriteCond %{HTTPS} !=on
RewriteRule ^/?(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
In nginx-proxy, access to port 443 handle by nginx where nginx to apache always use port 30080
Kloxo-MR!

 


Top 10 Social Networking:    Facebook    Twitter    LinkedIn    Pinterest    Google Plus    Tumblr    Instagram    VK    Flickr    Vine
Click Here

Page created in 0.025 seconds with 19 queries.

web stats analysis