之前写了一篇文章关于linux下apache虚拟主机配置,配置那是相当简单: <VirtualHost *:80> ServerAdmin admin@example.com DocumentRoot /var/www/html/blog ServerName blog.phpddt.com ErrorLog /var/log/httpd/blog/error_log CustomLog /var/log/httpd/blog/access_log common </VirtualHos…
1.安装nginx # pcre中文"perl兼容正则表达式",安装pcre库是为了让nginx支持具备URL重写功能 # 的Rewrite模块,rewrite可以实现动态页面转成伪静态.301网页跳转等功能. yum -y install pcre pcre-devel openssl openssl-devel gcc gcc+ useradd www -M -s /sbin/nologin useradd oldboy mkdir /home/oldboy/tools/ cd /…
指导操作:https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md 一.先安装 Docker / Git: wget -qO- https://get.docker.com/ | sh 二.安装discourse创建一个/var/discourse文件夹,克隆官话码头形象投入其中: sudo -smkdir /var/discoursegit clone https://github.com/discours…
如果一台服务器只有一个IP或需要通过不同的端口访问不同的虚拟主机,可以使用基于端口的虚拟主机配置. (1) 在虚拟机的CentOS7服务器上配置 eth0:4 为192.168.1.214: (2) 配置 /etc/hosts文件以方便测试: 进行ping测试,看ip地址有没有导通: (3) 建立虚拟主机存放网页的根目录,并建立首页文件 index.html (4) 修改 /usr/local/apache2/conf/httpd.conf 文件,在文件末尾添加以下内容: Listen List…
Apache 配置虚拟主机支持3种方式:基于IP的虚拟主机配置,基于端口的虚拟主机配置,基于域名的虚拟主机配置.本篇随笔记录自己基于IP的虚拟主机配置. 如果同一台服务器有多个IP,可以使用基于IP的虚拟主机配置,将不同的服务绑定在不同的IP上. (1)绑定IP: 在虚拟机中搭建的CentOS 7 服务器的IP被自己设置为了静态IP 192.168.1.210,现在使用ifconfig在同一个网络接口上绑定192.168.1.211~213这三个IP: ifconfig eth0: up ifc…
1.目前能够提供Web网络服务的程序有IIS(Windows系统中默认的Web服务程序,是一款图形化的网站管理工具).Nginx和Apache(RHEL 7系统中默认的Web服务程序)等. Apache:基金会.软件名称. http:协议名称 httpd:软件包名称 在httpd服务程序的主配置文件中,存在三种类型的信息:注释行信息.全局配置.区域配置. 配置httpd服务程序时最常用的参数以及用途描述 ServerRoot 服务目录 ServerAdmin 管理员邮箱 User 运行服务的用户…
2016年11月4日15:59:12 LAMP环境 参考:http://blog.itblood.com/nginx-same-ip-multi-domain-configuration.html 在httpd/conf/httpd.conf里按照如下配置: symlink attack 符号连结攻击 Creating symlink for sourcetitles 创建节目源链接 symlink 创建符号链接,建立符号连接,符号链接 Windows 添加虚拟主机之后,重启不了Apache ,…
修改文件:httd.conf 文件地址:D:\wamp\bin\apache\Apache2.2.21\conf #配置虚拟主机<VirtualHost 127.0.0.3:80>ServerName www.baozhuangji.cnDocumentRoot "D:/webRoot/metinfo/"</VirtualHost> <Directory "D:/webRoot/metinfo/"> Options Indexes…
设置apache 多个虚拟目录记录 #配置第2个虚拟目录<VirtualHost 127.0.0.2:80>ServerName www.xx.comDocumentRoot "E:/wamp/www/"</VirtualHost> <Directory "E:/wamp/www/">    Options Indexes FollowSymLinks Multiviews    AllowOverride All    Orde…
普遍 apache多站点(灰色(连接一起的红色)字体 为命令) 编辑文件:httpd.conf 找到以下内容: # Virtual hosts # Include /private/etc/apache2/extra/httpd-vhosts.conf 将 上面一行的“#”号去掉   编辑文件:httpd-vhosts.conf 加入以下代码: <VirtualHost *:80> #站点目录(目录文件夹必须存在,否则重启apache会报警告) DocumentRoot "/var/…