Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache VirtualHost-域名_Apache_Subdomain_Virtualhost - Fatal编程技术网

Apache VirtualHost-域名

Apache VirtualHost-域名,apache,subdomain,virtualhost,Apache,Subdomain,Virtualhost,我买了一个域名,一个是.fr,另一个是.com 现在,我想将我的域名重定向到运行在端口4000上的服务器 为此,我使用了virualhost: <VirtualHost *:80> ServerName http://www.example.fr ServerAlias example.fr ProxyRequests Off ProxyVia On ProxyPass / http://localhost:4000/ ProxyPassReverse / http://local

我买了一个域名,一个是.fr,另一个是.com

现在,我想将我的域名重定向到运行在端口4000上的服务器

为此,我使用了virualhost:

<VirtualHost *:80>
ServerName http://www.example.fr
ServerAlias example.fr
ProxyRequests Off
ProxyVia On

ProxyPass / http://localhost:4000/
ProxyPassReverse / http://localhost:4000/

ErrorLog logs/error_log
CustomLog logs/access_log common
</VirtualHost>
当我访问.com时,它可以正常工作,但不能与.fr一起工作


有什么想法吗?thx将服务器名和服务器别名更改为:

ServerName example.fr
ServerAlias www.example.fr example.com www.example.com