lnmp wordpress 安装 lnmp下安装wordpress
摘要:如何搭建LNMP环境来运行wordpress 第一步、准备伪静态脚本。server { listen 80; server_name laozuo org; server_name_in_redir...
发布日期:2020-10-08如何搭建LNMP环境来运行wordpress
第一步、准备伪静态脚本。
server { listen 80; server_name laozuo.org; server_name_in_redirect off; access_log /var/log/nginx/localhost.access_log main; error_log /var/log/nginx/localhost.error_log info; root PATH_ON_SERVER; index index.php index.html index.htm default.html default.htm; # Support Clean (aka Search Engine Friendly) URLs location / { try_files $uri $uri/ /index.php$args; } # deny running scripts inside writable directories location ~* /(images|cache|media|logs|tmp)/.*\.(php|pl|py|jsp|asp|sh|cgi)$ { return 403; error_page 403 /403_error.html; } location ~ \.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include /etc/nginx/fastcgi.conf; } # caching of files location ~* \.(ico|pdf|flv)$ { expires 1y; } location ~* \.(js|css|png|jpg|jpeg|gif|swf|xml|txt)$ { expires 14d; }} 第二步,修改文件。
/usr/local/nginx/conf/vhost/www.laozuo.org.conf 这个文件是在添加域名站点时候自动生成的,然后修改这个脚本为第一步的伪静态文件,全部替换就OK。
这样把所有的伪静态都写入的,而没有像wordpress采用调用的方式。
效果是一样的。
第三步、重启LNMP。
/root/lnmp restart
如何在阿里云云服务器ecs上搭建Wordpress博客
虚拟机能做什么他就能做什么。
它能做什么。
为什么使用docker而不选择VMware类似问题已经回答了好多遍了,这样给你说吧,docker里面创建的容器就相当于是在VMware里面创建的虚拟机并已使用镜像文件装好系统!docker就相当于是VMware,就是一台服务器虚拟化很多服务器,docker里面的镜像就相当于VMware在装系统是使用的镜像文件