Apache虚拟主机配置简单例子

简介:

文章地址: http://blog.csdn.net/5iasp/article/details/9221679

 

具体如下:

 

<VirtualHost *:80>
    DocumentRoot "/data/www/test"
    ServerName test.58tech.com
    RewriteEngine on

    RewriteEngine on
    RewriteRule ^/rule$  /rule/ [R]
    RewriteRule ^/rule/$ /test2013/5033/test/index.shtml [L,PT]
    RewriteRule ^/signup$  /signup/ [R]
    RewriteRule ^/signup/$ /s2013/5033/test200545034/index.shtml [L,PT]

    <Directory "/data/www/test">
                AllowOverride None
                Options Includes FollowSymLinks
                Order allow,deny
                Allow from all
                Options +Includes
                AddType text/html .shtml
                AddOutputFilter INCLUDES .shtml .inc
    </Directory>
    DirectoryIndex /my/test/index/index.shtml
    #ErrorLog /dev/null
    #LogLevel crit
    CustomLog "|/58tech/pkg/apache2/bin/rotatelogs /data/logs/58tech_access_log.%Y%m%d 86400 480" combined
</VirtualHost>




实现如下:
 
 http://test.58tech.com  打开: /my/test/index/index.shtml    


http://test.58tech.com/rule  打开: /test2013/5033/test/index.shtml  地址栏: http://test.58tech.com/rule/

http://test.58tech.com/signup  打开: /s2013/5033/test200545034/index.shtml  地址栏: http://test.58tech.com/signup/

目录
相关文章
|
5天前
|
Ubuntu Apache
apache2 ubuntu18.04 配置虚拟端口
apache2 ubuntu18.04 配置虚拟端口
|
5天前
|
SQL Apache HIVE
一文彻底掌握Apache Hudi的主键和分区配置
一文彻底掌握Apache Hudi的主键和分区配置
84 0
|
5天前
|
Java 程序员 API
Springboot-swagger配置(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot-swagger配置(idea社区版2023.1.4+apache-maven-3.9.3-bin)
70 1
|
7月前
|
PHP Apache
PHP环境搭建(配置php模块到apache服务器)
PHP环境搭建(配置php模块到apache服务器)
69 0
|
5天前
|
前端开发 Java 数据库连接
Springboot-MyBatis配置-配置端口号与服务路径(idea社区版2023.1.4+apache-maven-3.9.3-bin)
Springboot-MyBatis配置-配置端口号与服务路径(idea社区版2023.1.4+apache-maven-3.9.3-bin)
34 0
|
7月前
|
Linux 网络安全 Apache
百度搜索:蓝易云 ,linux系统 Apache服务配置教程。
现在,您可以通过浏览器访问您的网站。在浏览器中输入服务器的IP地址或域名,即可访问默认网站或配置的虚拟主机。以上是在Linux系统上配置Apache服务的教程。请根据您的需求进行必要的配置和修改。
91 0
|
5天前
|
安全 Linux Apache
Apache代理服务器搭建和配置
Apache代理服务器搭建和配置
|
5天前
|
Java Maven
Maven配置以及IDEA设置(Cannot resolve plugin org.apache.maven.plugins:报错)
Maven配置以及IDEA设置(Cannot resolve plugin org.apache.maven.plugins:报错)
24 1
|
5天前
|
负载均衡 Ubuntu 应用服务中间件
Apache(mod_proxy)+Tomcat负载均衡配置
Apache(mod_proxy)+Tomcat负载均衡配置
|
5天前
|
缓存 负载均衡 网络安全
如何配置Apache的反向代理
如何配置Apache的反向代理

热门文章

最新文章

推荐镜像

更多