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

经过开发建设 网站上线了怎么做互联网推广

经过开发建设 网站上线了,怎么做互联网推广,前端网站建设插件,卖挂的网站怎么做Linux/centos上如何配置管理Web服务器? 1 Web简单了解2 关于Apache3 如何安装Apache服务器?3.1 Apache服务安装3.2 httpd服务的基本操作 4 如何配置Apache服务器?4.1 关于httpd.conf配置4.2 常用指令 5 简单实例 1 Web简单了解 Web服务器称为…

Linux/centos上如何配置管理Web服务器?

  • 1 Web简单了解
  • 2 关于Apache
  • 3 如何安装Apache服务器?
    • 3.1 Apache服务安装
    • 3.2 httpd服务的基本操作
  • 4 如何配置Apache服务器?
    • 4.1 关于httpd.conf配置
    • 4.2 常用指令
  • 5 简单实例

1 Web简单了解

  • Web服务器称为WWW服务器,主要是提供上网功能;
  • 常见的Web服务器有:Microsoft IISIBM WebSphereApacheTomcat等;
  • 本文主要以Apache服务器为例了解一些Linux/centos上如何配置管理Web服务器。

2 关于Apache

  • Apache是一种开源的Web服务器软件;
  • 具有跨平台特性,支持UnixLinuxBSD等操作系统;
  • 支持静态和动态内容;
  • 对于模块化支持;
  • 支持SSL和虚拟主机;
  • 具有完整的日志功能;
  • 支持用户认证机制等。

3 如何安装Apache服务器?

3.1 Apache服务安装

  • 先检查系统上是否已经安装了Apache服务,如下:
rpm -qa | grep httpd
  • 我的是已经安装了如下:
    在这里插入图片描述
  • 如果没有安装,可以使用以下命令安装:
yum -y install httpd

3.2 httpd服务的基本操作

  • 查看httpd服务的运行状态:
systemctl status httpd.service
  • 如下显示,我的还没有启动:
    在这里插入图片描述
  • 启动httpd服务:
systemctl start httpd.service
  • 启动后如下显示:
[root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP ServerLoaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)Active: active (running) since Wed 2023-11-08 17:53:21 CST; 2s agoDocs: man:httpd(8)man:apachectl(8)Main PID: 5953 (httpd)Status: "Processing requests..."Tasks: 9CGroup: /system.slice/httpd.service├─5953 /usr/sbin/httpd -DFOREGROUND├─5954 /usr/libexec/nss_pcache 6 off├─5956 /usr/sbin/httpd -DFOREGROUND├─5958 /usr/sbin/httpd -DFOREGROUND├─5959 /usr/sbin/httpd -DFOREGROUND├─5960 /usr/sbin/httpd -DFOREGROUND├─5961 /usr/sbin/httpd -DFOREGROUND└─5962 /usr/sbin/httpd -DFOREGROUNDNov 08 17:53:20 localhost.localdomain systemd[1]: Starting The Apache HTTP Server...
Nov 08 17:53:20 localhost.localdomain httpd[5953]: AH00558: httpd: Could not reliably determine the server's fully qualified domain na...message
Nov 08 17:53:21 localhost.localdomain systemd[1]: Started The Apache HTTP Server.
Hint: Some lines were ellipsized, use -l to show in full.
  • 停止httpd服务:
systemctl stop httpd.service
  • 重启httpd服务:
systemctl restart httpd.service
  • 设置开机自启动:
systemctl enable httpd.service
  • 查看设置自启动是否成功:
systemctl list-unit-files | grep httpd
  • 如下显示则为设置成功了:
    在这里插入图片描述

4 如何配置Apache服务器?

4.1 关于httpd.conf配置

  • Apache服务的配置文件为httpd.conf,文件在`/etc/httpd/conf/下:
    在这里插入图片描述
  • httpd.conf文件内容说明:
内容说明
#ServerRoot全局环境设置
#Main serve rconfiguration主服务器设置
虚拟主机设置

4.2 常用指令

指令说明示例
ServerName设置Apache服务器的主机名和端口号ServerName www.noamanelson.com 80
ServerRoot设置Apache服务器的根目录,包括conf、logs、modules等子目录ServerRoot /etc/httpd
Listen设置Apache服务器的监听端口,默认监听80,一般在监听非80时会设置Listen 8088
DocumentRoot设置Apache提供的HTML文档根目录 ,默认为/var/www/htmlDocumentRoot /www/myweb
Directory指定Apache服务器根目录的访问权限和方式<Directory "/var/www">AllowOverride None Require all granted </Directory >
DirectoryIndex设置Apache服务器网站的主文件,通常为index.htmlDirectoryIndex index.html
VirtualHost设置特定虚拟主机<VirtualHost 192.168.1.7> DocumentRoot /www/myweb ServerName noamanelson.com </VirtualHost>
ServerAdmin设置管理员邮箱ServerAdmin admin@noamanelson.com
TimeOut设置接收和发送数据时的超时时间TimeOut 100
ErrorLog指定Apache服务器使用的错误日志文件ErrorLog logs/error_log
CustomLog指定Apache服务器使用的访问日志/
Include其他配置文件/

5 简单实例

  • 主要目标是配置个人Web站点;
  • 建用户NoamaNelson,修改权限,并建立目录public_html:
    在这里插入图片描述
useradd NoamaNelson
mkdir /home/NoamaNelson/public_html
chmod +711 /home/NoamaNelson/
chmod +755 /home/NoamaNelson/public_html/
  • public_html下建立网页文件index,html:
vim /home/NoamaNelson/public_html/index.html
Welcome everyone,
This is my Web~~~
  • 配置/etc/httpd/conf.d/userdir.conf文件:
<IfModule mod_userdir.c>#UserDir disabledUserDir public_html
</IfModule><Directory "/home/*/public_html">AllowOverride FileInfo AuthConfig Limit Indexes#Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExecOptions NoneRequire method GET POST OPTIONS
</Directory>Require method GET POST OPTIONS
  • 保存以上文件,重启服务器,关闭防火墙,将Selinux设置为Permissive
    在这里插入图片描述
systemctl start httpd
systemctl stop firewalld.service
setenforce 0
getenforce
  • 在浏览器中输入服务ip/ ~NoamaNelson/即可打开NoamaNelson的个人主页,比如我的是如下:
    在这里插入图片描述
http://172.28.18.146/~NoamaNelson/
http://www.dt0577.cn/news/16407.html

相关文章:

  • 南阳网站建设多少钱江门seo
  • 做app和做网站相同和区别网站推广优化外包便宜
  • 网站建设维护工作147seo工具
  • 做外单网站有哪些内容seo优化服务
  • wordpress获取微信用户seo推广营销公司
  • 郑州响应式网站建设百度指数网址是什么
  • 接单子做网站词点击器 百度网盘
  • 小说网站怎么用html做seo流量工具
  • 珠海精品网站建设手机网络优化软件
  • 建设工程司法解释站长工具seo词语排名
  • 和一起做网店类似的网站北京网优化seo公司
  • 网页设计实训报告的目的企业网站优化的三层含义
  • 支持wordpress的mysql广安seo外包
  • 集团做网站需要多大的带宽seo关键词优化案例
  • 企业官网建设 创意网站建设百度seo优化规则
  • 哪个网站可以接工程做重庆人力资源和社会保障网官网
  • bae wordpress 3.8百度一键优化
  • 淘宝网站建设特点品牌推广方案模板
  • 河北建设工程网站北京网站seo招聘
  • 电子商务网站开发期末考试免费推广平台排行
  • 设置网站域名官网优化包括什么内容
  • 网站注册都需要什么成全高清免费观看mv
  • 个人网站建设价格免费网站推广软件
  • 广安门内网站建设石家庄网站建设seo
  • 中卫网站推广软件成品网站货源1688在线
  • 深圳代理记账行业协会seo快速排名优化
  • 中小企业网站开发沈阳网站seo
  • 安做省民改厅网站seo网站运营
  • 服务商查询东莞百度快照优化排名
  • 企业网站怎么做苏州百度代理公司