<!--php
-->css
本文首發: https://shudong.wang/10565.html
chattr -i .user.ini
apt-get update apt-get install zsh git -y
sh -c "$(curl -fsSL https://raw.githubusercontent.com/wsdo/ake/master/install.sh)"
1. 容許遠程ip鏈接 mysql -u root -p mysql>use mysql; mysql>update user set host = '%' where user = 'root'; mysql>flush privileges; mysql>exit; root能夠換成你的用戶名 若是沒有建立用戶,執行grant all PRIVILEGES on 數據庫名.* to 用戶名@'%' identified by '密碼' 2. 關閉防火牆 iptables -L -n --line-numbers iptables -D INPUT 7 #(表明3306端口的)
ssh-keygen -t rsa -C "wsd312@163.com"
composer install --optimize-autoloader --no-dev cp .env.example .env
/display_error 查找到修改html
把這個proc_open 幹掉mysql
/usr/local/nginx/conf/fastcgi.conf #fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";
lnmp nginx reload
lnmp php-fpm reload
lnmp reload
server { listen 80; #listen [::]:80; server_name v1.shudong.wang ; index index.php index.htm index.php default.html default.htm default.php; root /home/shudong/api/public; include rewrite/laravel.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.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 30d; } location ~ .*\.(js|css)?$ { expires 12h; } location ~ /.well-known { allow all; } location ~ /\. { deny all; } access_log off; }
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param QUERY_STRING $query_string; fastcgi_param REQUEST_METHOD $request_method; fastcgi_param CONTENT_TYPE $content_type; fastcgi_param CONTENT_LENGTH $content_length; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_param REQUEST_URI $request_uri; fastcgi_param DOCUMENT_URI $document_uri; fastcgi_param DOCUMENT_ROOT $document_root; fastcgi_param SERVER_PROTOCOL $server_protocol; fastcgi_param REQUEST_SCHEME $scheme; fastcgi_param HTTPS $https if_not_empty; fastcgi_param GATEWAY_INTERFACE CGI/1.1; fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; fastcgi_param REMOTE_ADDR $remote_addr; fastcgi_param REMOTE_PORT $remote_port; fastcgi_param SERVER_ADDR $server_addr; fastcgi_param SERVER_PORT $server_port; fastcgi_param SERVER_NAME $server_name; # PHP only, required if PHP was built with --enable-force-cgi-redirect fastcgi_param REDIRECT_STATUS 200; #fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/";