服务器

  • 使用宝塔的Let's Encrypt 免费证书

    1)首先,点击站点的【设置】按钮2)接着,点击【SSL】,然后再点击【Let‘s Encrypt】,接着点击【文件验证】,然后勾选域名,并点击【申请】,操作如下:3)接着,等待一段时间,让其自动生成证书,如下:4)接着,一段时间之后,得到的结果如下,然后直接点击保存按钮即可5)接着,返回站点列表,如下:6)接着,访问域名,结果如下:注意:一般这个证书是3个月(即90天),到期之后,需要手动续签,也可以在宝塔设置自动续签

  • lamp站点配置

    1 httpd.conf主配置文件## This is the main Apache HTTP server configuration file. It contains the# configuration directives that give the server its instructions.# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.# In particular, see # <URL:http://httpd.apache.org/docs/2.4/mod

  • LNMP站点配置文件2

    1 nginx.conf主配置文件worker_processes 1;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # 引入/usr/local/nginx/conf/extra目录下的所有虚拟主机文件 include /usr/local/nginx/conf/extra/*.conf; server { # 端口号 listen 80; # 域名,可以写真实域名,也可

  • LNMP站点配置文件1

    1 nginx.conf主配置文件worker_processes 1;events { worker_connections 1024;}http { include mime.types; default_type application/octet-stream; sendfile on; keepalive_timeout 65; # 引入/usr/local/nginx/conf/extra目录下的所有虚拟主机文件 include /usr/local/nginx/conf/extra/*.conf; server { # 端口号 listen 80; # 域名,可以写真实域名,也可

  • 使用Navicat连接阿里云服务器上的MySQL数据库

    1 开放阿里云服务器的3306端口:在安全组配置处开放3306端口2 mysql授权# 默认情况下,mysql用户不允许从远程登录,只能在localhost登录。需要我们进入mysql进行授权# 步骤1:切换到mysql数据库use mysql;# 步骤2:通过如下查询语句来显示所有的用户select user,host from user;# 步骤3:修改root 的host值,将host设置为%表示任何ip都能连接mysqlupdate user set host='%' where user='root' and host='localhost';# 步骤4:再次通过以下查询语句来显示所

  • 阿里云部署LAMP环境2

    1.准备工作实例已分配公网IP地址或绑定弹性公网IP(EIP)。操作系统必须为CentOS 7.x。实例安全组的入方向规则已放行22、80、443端口。2.环境说明Apache版本:Apache 2.4.6MySQL版本:MySQL 5.7.31PHP版本:PHP 7.3.333 Nginx安装# 安装Nginxyum -y install nginx# 查看版本nginx -v返回结果如下所示,表示Nginx安装成功。nginx version: nginx/1.20.14 安装MySQL# 更新YUM源rpm -Uvh http://dev.mysql.com/get/mysql57-co