Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx accesses http and forcefully redirects to https

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

Server {listen 80; listen [:]: 80; server_name www.test; root / home/zrj/www/zhangrenjie_test; index index.php index.html; # here force the jump to https rewrite ^ (. *) https://$server_name$1 permanent; location / {# try_files $uri $uri/ = 404; try_files $uri $uri/ / index.php?$query_string } location ~\ .php$ {include snippets/fastcgi-php.conf; # With php-fpm (or other unix sockets): # fastcgi_pass unix:/var/run/php/php7.0-fpm.sock; # With php-cgi (or other tcp sockets): # fastcgi_pass 127.0.0.1 With php-fpm 9000 Fastcgi_pass unix:/run/php/php7.2-fpm.sock;}}

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report