随笔分类 - WebServer
Apache、Nginx
摘要:nginx配置虚拟机 在/usr/local/nginx/conf目录下nginx.conf文件是nginx的配置文件。 一、通过端口号区分虚拟机 二、通过域名区分虚拟机 [root@localhost sbin]# ./nginx -s reload
阅读全文
摘要:1、编辑 C:\Windows\System32\drivers\etc\hosts 2、修改apache配置文件httpd.conf 去掉# 3、
阅读全文
摘要:开启重写mod_rewrite.c 隐藏index.php 可以去掉URL地址里面的入口文件index.php,但是需要额外配置WEB服务器的重写规则。 以Apache为例,需要在入口文件的同级添加.htaccess文件(官方默认自带了该文件),内容如下: 如果用的phpstudy,规则如下: 接下
阅读全文
摘要:在http.conf加上
阅读全文
摘要:一、添加服务端口在文件Apache\conf\httpd.conf中,去掉前面的#号,重启 #LoadModule rewrite_module modules/mod_rewrite.so #Include conf/extra/httpd-vhosts.conf 二、在文件Apache\conf
阅读全文
摘要:在conf/extra目录下httpd-vhosts.conf
阅读全文