Apache Nginx 配置虚拟目录
发布日期:2021-06-29 02:25:17 浏览次数:2 分类:技术文章

本文共 694 字,大约阅读时间需要 2 分钟。

apache 配置虚拟目录

#注释掉apache默认的网站目录地址
#DocumentRoot "/Apache/htdocs"
#配置一个虚拟目录
<ifModule dir_module>
  #设置主页
  Direcotory index.html my.html
  #虚拟目录地址及名字
  Alias /myhome "/myhome"
  #允许访问权限
  <Direcotory d:/myhome>
    #读取顺序 先允许后拒绝  允许所有人拒绝所有人
    order allow,deny
    #允许所有人(结果为允许所有人)
    allow form all
  <Direcotory>
<IfModule>

 

或者:

<VirtualHost *:80>

    DocumentRoot "E:\www\sk"
    ServerName e.com
    ServerAlias 
    Alias /kouhong "E:\www\kouhong\public"
  <Directory "E:\www\sk">
      Options FollowSymLinks ExecCGI
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>

 

Nginx:

location /web/ {

      alias /home/www/html/;
       rewrite ^/index.php(.*)$ /index.php?s=$1 last;
}

 

更多:

转载地址:https://blog.csdn.net/yyws2039725/article/details/103832400 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:Win7加装CentOS8做双系统记录
下一篇:NPM常用指令及注意事项

发表评论

最新留言

能坚持,总会有不一样的收获!
[***.219.124.196]2024年04月05日 19时57分55秒