How can i redireect from https to http?
i have the code below but it does not seem to work.
server {
listen 443;
server_name example.com;
rewrite ^(.*) http://example.com$1 permanent;
}
How can i redireect from https to http?
i have the code below but it does not seem to work.
server {
listen 443;
server_name example.com;
rewrite ^(.*) http://example.com$1 permanent;
}
The answer above will work, you need to generate a self signed cert (or have a real one) and configure nginx as such:
server {
listen *:443;
ssl on;
server_name domain.com;
rewrite ^(.*) http://domain.com$1 permanent;
ssl_certificate /data/certs/domain.crt;
ssl_certificate_key /data/certs/domain.key;
}
Keep in mind, if it is a self signed cert the browser will give you an ugly warning.
Building off jberger s comment a configuration that should work would be:
server {
listen *:80;
server_name example.com;
}
server {
listen *:443 ssl;
server_name example.com;
ssl_certificate /etc/ssl/certs/example.com.cert;
ssl_certificate_key /etc/ssl/private/example.com.key;
return 301 http://$server_name$request_uri;
}
if ($host = foo.com ) {
rewrite ^/(.*)$ http://www.foo.com$1 permanent;
}
If I want to give an option for users to log in to a website using https:// instead of http://, I d best to give them an option to get there in my view or template. I d like to have the link "Use ...
I m developing an application in Rails (2.3.4) and there are some parts that need to run over a secure protocol, for example, the login form, the credit card form, etc. How can I do just these pages ...
I want to open a stream to a httpS URL and read the data. Kindly let me know how to do it. Regards Chaitanya
Hi I have added the below code to .ht access but how can I add another page to this? such as login.php also if the user types in www. they get a "untrusted connection" as the SSL is only valid ...
I have a J2EE webapp which is used to download a generated PDF served by an HTTP servlet. When running over SSL in production the users are getting the error message There was an error opening ...
I created a page that is HTTPS only. On my browsers, I always get a warning that the page includes resources that are not secured. I just can t find out why! Looking at the source code seems fine. All ...
I need to login to a website and perform an action. The website is REST based so I can easily login by doing this (the login info is included as a querystring on the URL, so I dont t need to set the ...
I have a WCF service that I would like to run on https:// how can I setup a test site on local host for this?