Rewrite rules for https processing under Nginx only for loggingphp nginx https forward proxy nginx https ios access https build ngin

WBOY
Release: 2016-07-29 08:49:10
Original
1018 people have browsed it

Source of article: Rewrite rules for https processing only for logging.php under Nginx

Add the following configuration under https server:

if ($uri !~* "/logging.php$")
{
rewrite ^/(.*)$ http://$host/$1 redirect;
}

Add the following configuration under the http server:

if ($uri ~* "/logging.php$")

{
rewrite ^/(.*)$ https://$host/$1 redirect;
}

The final result is that users will and will only access logging.php through https. Effectively avoid the behavior of stealing account passwords through ARP spoofing, sniffing and other methods.


The above introduces the rewriting rules for https processing under Nginx only for loggingphp, including nginx and https content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!