我尝试使用NGINX将HTTPS请求重定向到HTTP。NGINX将HTTPS重定向到HTTP
这个我怎么编辑
的/ etc/nginx的/网站可用/默认
在我的VPS:
server {
listen 443;
server_name exapmle.com;
rewrite ^(.*) http://example.com$1 permanent;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/laravel/public;
index index.php index.html index.htm index.nginx-debian.html;
server_name example.com www.example.com;
if ($https = "on") {
return 301 http://www.example.com$request_uri;
}
location/{
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
所以我做了什么错什么想法?
出于好奇,为什么你要重定向HTTPS到http? – Difster
我尝试运行Google广告,但他们不接受我的广告,因为这样:https://support.google.com/adwordspolicy/answer/6368661?hl = zh_CN&authuser = 0#673 –
@Difster在我的广告中声称:目的地不工作 –