Apache Nginx 配置虚拟目录

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://www.cnblogs.com/kevingrace/p/6187482.html

发布了69 篇原创文章 · 获赞 31 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/yyws2039725/article/details/103832400
今日推荐