Quantcast
Channel: Networking How To's » rewrite
Viewing all articles
Browse latest Browse all 4

Rewrite a http request to https with nginx

$
0
0
If you have a web server running nginx that accepts both http and https connections, there may be times where you want to prevent anyone from accessing a specific page/url using a insecure http connection. For example, login or registration pages. You always want these to be secure if you can. Add the following into the main “location /” block, located in the http “server” section in your nginx configuration file for your site. if ($request_uri ~* "/login.php") { rewrite…

Read more
[...]

Viewing all articles
Browse latest Browse all 4

Trending Articles