在vhosts文件夹内创建 recovery.qwq.ro.conf 文件
server {
listen 80;
server_name recovery.qwq.ro;
index index.php index.html index.htm default.php default.htm default.html;
root /var/www/recovery;
#access_log /www/access_ example1.log main;
location / {
index index.php index.html index.htm;
#autoindex on;#如果文件不存在列出目录结构;
}
#禁止访问的文件或目录
location ~ ^/(\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)
{
return 404;
}
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
location ~ /\.ht {
deny all;
}
}