windows虚拟域名设置

来源:互联网 发布:union软件安卓 编辑:程序博客网 时间:2024/04/27 01:57

apache

<VirtualHost *:80>      ServerName www.test.com      ServerAdmin webmaster@dummy-host2.example.com      DocumentRoot "D:/phpStudy/WWW/app"      ErrorLog "logs/dummy-host2.example.com-error.log"      CustomLog "logs/dummy-host2.example.com-access.log" common  </VirtualHost> 

nginx
nginx.conf最后一行改为 include vhost/*.conf;
以下为vhost/test.conf

server {        listen       80;        server_name  www.test.com;        location / {            root   "D:/phpStudy/WWW/app/";            index  index.html index.htm index.php;        }        location ~ \.php$ {            root          "D:/phpStudy/WWW/app/";            fastcgi_pass   127.0.0.1:9000;            fastcgi_index  index.php;            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;            include        fastcgi_params;        }} 
0 0
原创粉丝点击