コミットを比較
2 コミット
d1364cd1d8
...
7c54ab191e
作成者 | SHA1 | 日付 |
---|---|---|
守矢諏訪子 | 7c54ab191e | |
守矢諏訪子 | 72057cc879 |
|
@ -0,0 +1,63 @@
|
|||
server {
|
||||
server_name www.hozon.site hozon.site;
|
||||
|
||||
if ($host = www.hozon.site) {
|
||||
return 301 https://hozon.site$request_uri;
|
||||
}
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
root /www/active/hozon.site/www;
|
||||
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||
|
||||
location / {
|
||||
add_header Permissions-Policy interest-cohort=();
|
||||
add_header X-Content-Type-Options nosniff;
|
||||
add_header X-XSS-Protection "1; mode=block";
|
||||
add_header Strict-Transport-Security 'max-age=31536000; includeSubDomains; preload';
|
||||
satisfy any;
|
||||
allow all;
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
fastcgi_pass unix:/var/run/php/php8.0-fpm.sock;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
|
||||
location ~* \.(jpg|jpeg|png|gif|ico|woff|webp)$ {
|
||||
expires 365d;
|
||||
}
|
||||
|
||||
location ~* \.(css|js|json)$ {
|
||||
expires 7d;
|
||||
}
|
||||
|
||||
listen 443 ssl http2;
|
||||
ssl_certificate /etc/letsencrypt/live/hozon.site/fullchain.pem;
|
||||
ssl_certificate_key /etc/letsencrypt/live/hozon.site/privkey.pem;
|
||||
include /etc/letsencrypt/options-ssl-nginx.conf;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name www.hozon.site hozon.site;
|
||||
listen 80;
|
||||
|
||||
if ($host = hozon.site) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
|
||||
if ($host = www.hozon.site) {
|
||||
return 301 https://hozon.site$request_uri;
|
||||
}
|
||||
|
||||
return 404;
|
||||
}
|
|
@ -87,7 +87,7 @@
|
|||
$file = striptags($file); // 危険なタグの削除
|
||||
|
||||
// ヘッダーの追加
|
||||
$file = "<!DOCTYPE html><html><head><meta charset=\"utf-8\" /><head><body><div style=\"background-color: #320202 !important; display: block !important; border: 4px #ff3b3b groove !important; color: #ea8181 !important; padding: 10px !important; z-index: 999999 !important; position: fixed !important; left: 0 !important; top: 0 !important; font-size: 14px !important; font-family: unset !important; width: 100% !important;\">保存サイトでアーカイブしました。Archived with Hozon Site.<br /><a style=\"color: #ffeb3b !important;\" href=\"/\">トップページへ To toppage</a></div><div style=\"padding-top: 74px !important;\">".$file.'</div></body></html>';
|
||||
$file = "<!DOCTYPE html><html><head><meta charset=\"utf-8\" /><head><body><div style=\"background-color: #320202 !important; display: block !important; border: 4px #ff3b3b groove !important; color: #ea8181 !important; padding: 10px !important; z-index: 999999 !important; position: fixed !important; left: 0 !important; top: 0 !important; font-size: 14px !important; font-family: unset !important; width: 100% !important;\">".SITE_NAME_JA."でアーカイブしました。Archived with ".SITE_NAME_EN.".<br /><a style=\"color: #ffeb3b !important;\" href=\"/\">トップページへ To toppage</a></div><div style=\"padding-top: 74px !important;\">".$file.'</div></body></html>';
|
||||
|
||||
// 保存
|
||||
file_put_contents(urldecode($path), $file);
|
||||
|
|
新しいイシューから参照