1
我的任務是完成一個項目。 我們有我們的服務器上的兩個目錄,一個是 http://example.com/app ,另一個是 http://example.com/fwNGINX http to https如果只包含某個目錄
我被要求做的,是從HTTP重定向到HTTPS,如果在這兩個目錄頁面上的任何訪問者的土地(應用程序和FW) 這是我在配置文件中迄今爲止所做的。當我將這些行添加到「服務器」下面的配置文件並重新啓動時,該站點不會恢復。不幸的是,我無法訪問日誌文件。欣賞任何人都願意看看這
location ~ ^/miner/memclub/.+\.html$ {
rewrite ^(.+)\.html$ /bootstrap.php?file=$1.html last;
rewrite ^(.+)\.phtml$ /bootstrap.php?file=$1.phtml last;
error_page 404 = /404.php;
}
server {
server_name site.org;
server_name *.site.org;
location /app {
if ($scheme = http) {
rewrite^https://site.org/app last;
}
}
}