我是你的范儿我是你的范儿Windows下Apache与Nginx同时用Apache配置动态,Nginx配置静态Apache多端口配置与nginx反向代理Nginx允许加载自定义字体Apache多端口配置1、在apache/conf/extra下的httpd-vhosts.conf后添加如下代码NameVirtualHos*:8080Listen8080VirtualHost*:8080DocumentRootD:\code\mi\publicSeverName127.0.0.1SeverAlias127.0.0.1DirectoryD:\code\mi\publicallowfromallOptions+Iadexes/Directory/VirtualHostNameVirtualHos*:8081Listen8081VirtualHost*:8081DocumentRootD:\code\local\publicSeverName127.0.0.1SeverAlias127.0.0.1DirectoryD:\code\local\publicallowfromallOptions+Iadexes/Directory/VirtualHost2、或者直接重修新建一个文件在以上目录下httpd-faner.conf将上面代码写进文件然后在httpd.conf文件后添加如下代码Includeconf/extra/httpd-faner.conf我是你的范儿我是你的范儿Nginx反向代码Nginx/conf/nginx.confsever{listen80;sever_name{proxy_pass}}sever{listen80;sever_name{proxy_pass}}Apache与nginx共用一个端口时会报错导致其一个不能正常开启,所以采用不同端口配置。Nginx配置加载自定义字体Nginx/conf/nginx.confhttp{add_headerAccess-Control-Allow-Origin*;}*指允许全部域名加载,可以选择定义指定域名允许加载。