每次改 .env 都得通过修改代码来改吗?.env 文件能不能通过在后台配置呢?
其实是很简单就可以实现的,把以下函数加入到你的项目中
Nginx 伪静态
server{
#端口配置
listen 80;
#域名配置
server_name laravel.cc;
index index.php index.html index.htm;
#站点配置到public
root /data/wwwroot/laravel.cc/public;
#日志记录
access_log /data/logs/nginx.laravel.cc.log access;
error_log /data/logs/nginx.laravel.cc.error debug;
#静态文件配置
location ~ .*\.(jpg|jpeg|gif|png|bmp|css|js|swf|txt|ttf|woff|ico)$ {
expires 7d;
break;
}
location / {
#重点区
try_files \$uri \$uri/ /index.php?$query_string;
index index.php index.html index.htm;
}
#静态文件配置
location /logs {
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
break;
}
#处理php配置
location ~ "\.php$" {
include fastcgi_params;
fastcgi_index index.php;
#在nginx.conf配置server_mango
fastcgi_pass server_mango;
}
} 1.0 作用
用于实现框架中的encrypt(加密)服务,例如存储用户的session,cookie等,从而确保信息安全。可以通过artisan命令将该key更新。简单的说就是 开启了框架的一个函数功能。
1.准备工作
yum -y install gcc gcc-c++ automake libtool zlib-devel glib2-devel bzip2-devel libuuid-devel spice-protocol spice-server-devel usbredir-devel libaio-devel 开启虚拟化:
cat << EOF > /etc/modprobe.d/kvm-nested.conf
options kvm-intel nested=1
options kvm-intel enable_shadow_vmcs=1
options kvm-intel enable_apicv=1
options kvm-intel ept=1
EOF