LNMP 301重定向 无限次
server{
listen 80;
#listen [::]:80;
server_name www.xxx.com xxx.com;
return 301 https://www.xxx.com$request_uri;
index index.html index.htm index.php default.html default.htm default.php;
root/home/wwwroot/www.xxx.com/public;
include rewrite/xxx.conf;
#error_page 404 /404.html;
# Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }
include enable-php-pathinfo.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 12h;
}
location ~ /.well-known {
allow all;
}
location ~ /\.
{
deny all;
}
location / {
try_files $uri /index.php$is_args$args;
}
access_log/home/wwwlogs/www.xxx.com.log;
}
我设置了 为什么就是进不去无限次
if ($host = 'lnmp.org') {return 301 https://www.lnmp.org$request_uri;}这段代码怎么设置 xxx.com调整 https://www.xxx.com www.xxx.com也调整 https://www.xxx.com
你至贴出的http虚拟主机的配置文件,没问题
https的配置文件也需要贴出来 licess 发表于 2019-9-21 19:34
你至贴出的http虚拟主机的配置文件,没问题
https的配置文件也需要贴出来
没有 HTTPS的,因为HTTPS安装失败了,不过又可以打开https
页:
[1]