当前位置: 首页 > news >正文

自考网页制作与网站建设做兼职的网站有哪些

自考网页制作与网站建设,做兼职的网站有哪些,咸宁哪个企业没有做网站,高级网络工程师证书文章目录 一、准备工作1.1 安装Apache服务器1.2 Apache服务器上已经开启了443端口1.3 Apache服务器上已安装了mod_ssl.so模块1.4 获取SSL证书 二、配置apache2.1 配置apache文件2.2 生效配置文件 一、准备工作 1.1 安装Apache服务器 yum install httpd -y1.2 Apache服务器上已…

文章目录

  • 一、准备工作
    • 1.1 安装Apache服务器
    • 1.2 Apache服务器上已经开启了443端口
    • 1.3 Apache服务器上已安装了mod_ssl.so模块
    • 1.4 获取SSL证书
  • 二、配置apache
    • 2.1 配置apache文件
    • 2.2 生效配置文件

一、准备工作

1.1 安装Apache服务器

yum install httpd -y

1.2 Apache服务器上已经开启了443端口

443为HTTPS服务的默认端口

1.3 Apache服务器上已安装了mod_ssl.so模块

启用SSL功能,安装mod_ssl.so模块

yum install -y mod_ssl

1.4 获取SSL证书

使用Certbot签发和续费泛域名SSL证书:https://blog.csdn.net/cljdsc/article/details/133461361

二、配置apache

2.1 配置apache文件

vhost的域名配置文件.conf,在目录:/etc/httpd/conf.d

  • HTTP配置:
Listen 80# 指定域名
ServerName www.example.com# 指定文档根目录
DocumentRoot /var/www/html# 是否启用访问日志
CustomLog /var/log/httpd/access.log combined# 指定错误日志路径
ErrorLog /var/log/httpd/error.log# 配置虚拟主机
<VirtualHost *:80>ServerAdmin admin@example.comDocumentRoot /var/www/html/project# 访问权限<Directory /var/www/html/project>Options Indexes FollowSymLinks MultiViewsAllowOverride AllOrder allow,denyallow from allRequire all granted</Directory># 使用PHP解析器处理.php文件<FilesMatch \.php$>SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"</FilesMatch># 定义PHP脚本的目录索引DirectoryIndex index.php index.html# 自定义错误页面ErrorDocument 404 /error_404.html# 设置HTTP头信息Header set X-Content-Type-Options "nosniff"Header set X-XSS-Protection "1; mode=block"
</VirtualHost>
  • HTTPS配置:
<VirtualHost *:443>
DocumentRoot /var/www/html/project
ServerName www.cpayfinance.com
ServerAlias www.cpayfinance.com
SSLEngine on
SSLCertificateFile          /etc/letsencrypt/live/cpayfinance.com/cert.pem
SSLCertificateKeyFile       /etc/letsencrypt/live/cpayfinance.com//privkey.pem
SSLCertificateChainFile     /etc/letsencrypt/live/cpayfinance.com//chain.pem# 访问权限<Directory /var/www/html/project>Options Indexes FollowSymLinks MultiViewsAllowOverride AllOrder allow,denyallow from allRequire all granted</Directory># 使用PHP解析器处理.php文件<FilesMatch \.php$>SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"</FilesMatch># 定义PHP脚本的目录索引DirectoryIndex index.php index.html# 自定义错误页面ErrorDocument 404 /error_404.html# 设置HTTP头信息Header set X-Content-Type-Options "nosniff"Header set X-XSS-Protection "1; mode=block"
</VirtualHost>
  • HTTP & HTTPS 配置
Listen 80# 指定域名
ServerName www.cpayfinance.com# 指定文档根目录
DocumentRoot /var/www/html# 是否启用访问日志
CustomLog /var/log/httpd/access.log combined# 指定错误日志路径
ErrorLog /var/log/httpd/error.log# 配置虚拟主机
<VirtualHost *:80>ServerAdmin admin@example.comDocumentRoot /var/www/html/project# 访问权限<Directory /var/www/html/project>Options Indexes FollowSymLinks MultiViewsAllowOverride AllOrder allow,denyallow from allRequire all granted</Directory># 使用PHP解析器处理.php文件<FilesMatch \.php$>SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"</FilesMatch># 定义PHP脚本的目录索引DirectoryIndex index.php index.html# 自定义错误页面ErrorDocument 404 /error_404.html# 设置HTTP头信息Header set X-Content-Type-Options "nosniff"Header set X-XSS-Protection "1; mode=block"</VirtualHost><VirtualHost *:443>
DocumentRoot /var/www/html/project
ServerName www.cpayfinance.com
ServerAlias www.cpayfinance.com
SSLEngine on
SSLCertificateFile          /etc/letsencrypt/live/cpayfinance.com/cert.pem
SSLCertificateKeyFile       /etc/letsencrypt/live/cpayfinance.com//privkey.pem
SSLCertificateChainFile     /etc/letsencrypt/live/cpayfinance.com//chain.pem# 访问权限<Directory /var/www/html/project>Options Indexes FollowSymLinks MultiViewsAllowOverride AllOrder allow,denyallow from allRequire all granted</Directory># 使用PHP解析器处理.php文件<FilesMatch \.php$>SetHandler "proxy:unix:/run/php-fpm/php-fpm.sock|fcgi://localhost/"</FilesMatch># 定义PHP脚本的目录索引DirectoryIndex index.php index.html# 自定义错误页面ErrorDocument 404 /error_404.html# 设置HTTP头信息Header set X-Content-Type-Options "nosniff"Header set X-XSS-Protection "1; mode=block"
</VirtualHost>

2.2 生效配置文件

  • 查看配置文件是否正常
# apachectl -t
Syntax OK
  • 重启apache配置
systemctl restart httpd
http://www.yayakq.cn/news/631813/

相关文章:

  • 电商网站建设外包费用大学生做家教比较好的网站
  • 鹤壁网站建设优化wordpress标签不被收录
  • 请人做外贸网站应注意什么问题企业网站设计请示
  • 河北网站建设联系方式网站建设销售工作怎么样
  • 网站建设未来公关策划网站建设
  • 福安 网站建设哈尔滨网站建设托管
  • 口碑好的品牌网站建设平面设计培训怎么样
  • 网上商城建网站百度站长平台开绿色收录通道加快网站收录
  • 国家开发银行网站国外免费下载wordpress主题
  • 免费做易拉宝网站wordpress 无法打开
  • 电子商务网站建设的背景成都定制软件app开发
  • wordpress文章外部链接上海网站排名优化费用
  • 中国采购与招标网官方网站龙岩网站设计培训
  • 网站用ai做还是ps工商局注册公司网站
  • 电脑打不开建设银行网站关键词优化推广公司
  • dede企业网站wordpress出现百度抓取404页面
  • 怎么选择合肥网站建设免费发布外链
  • 公司宣传网站建设沈阳高端网站开发建设
  • 汕头高端网站建设长沙做网站推广公司咨询
  • 农安县住房和城乡建设厅网站梵克雅宝官网官方网
  • 医院网站建设管理规范php做网站时间代码
  • 哪里找专业做网站的公司北京文化传媒有限公司
  • 网站做链轮会被惩罚吗旅游景区网站建设
  • 制作小程序网站源码装修设计软件排名
  • 绍兴网站设计网站建设的公司排名
  • 网站上做地图手机上显示不出来的优斗网站建设
  • 建设房地产法律网站开展农业信息网站建设工作
  • 宣武网站建设服务wordpress 新闻发布
  • 青岛网站建设开发外包《设计》完整版
  • 福州企业建站软件网站优化建设上海