apache怎么修改默认首页文件(apache怎么修改默认首页文件)

东升常识网 1001 2023-04-13 21:05:53

 apache如何修改域名(APACHE访问域名后面要加个81端口号怎么去掉?)

一、APACHE访问域名后如何去掉一个81端口号?将配置文件listen of apache修改为80,或者站点配置文件的监听端口为80。

2.如何设置apache host头,使得只能访问指定的域名,禁止IP访问?1.为了防止域名解析的恶意指向,我们需要禁止apache默认的空主机头,如下:VI/etc/httpd/conf/httpnf编辑配置文件,在你的站点配置之前添加另一个站点(红色字体部分是我们要添加的,蓝色字体部分代表你正在使用的站点配置)名称虚拟主机*服务器Admin你的邮件@ MailDocumentRoot/Error servername ABC Server Admin你的邮件@ MailDocumentRoot你的站点路径servername你的网站服务器别名*。你的网站2。如果你在httpdnf里找不到类似上面的NAMEVistualHost,那就是他刚开始安装的时候就已经输入了域名。转到apache installation目录编辑conf目录中的httpdnf文件:找到# virtual hosts # include conf/extra/httpd-vhostnf,去掉include conf/extra/httpd-vhostnf之前的#并转到conf\\extra\\ Edit目录httpd-vhostsnf文件并添加名称virtual host * server admin your mail @ maildocumentroot/error servername itmopserver admin web master @ itmopdocumentroot d root d:/empire server/web servername itmopserver alias。

上一篇:apache修改默认路径(更改apache默认端口)
下一篇:返回列表
相关文章
返回顶部小火箭