Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/lua/3.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
I';我正在尝试使用XAMPP设置反向代理_Xampp_Reverse Proxy_Virtualhost - Fatal编程技术网

I';我正在尝试使用XAMPP设置反向代理

I';我正在尝试使用XAMPP设置反向代理,xampp,reverse-proxy,virtualhost,Xampp,Reverse Proxy,Virtualhost,我正在尝试使用XAMPP设置反向代理 我把omega.gu.co.uk添加到我的CNAME上了,爸爸 我设置httpd-vhosts.conf如下 <VirtualHost *:80> DocumentRoot "C:/xampp/htdocs" ServerName www.epicfailgu.co.uk ServerAdmin webmaster@epicfailgu.co.uk ErrorLog "C:/xampp

我正在尝试使用XAMPP设置反向代理 我把omega.gu.co.uk添加到我的CNAME上了,爸爸 我设置httpd-vhosts.conf如下

<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName www.epicfailgu.co.uk
    ServerAdmin webmaster@epicfailgu.co.uk
    ErrorLog "C:/xampp/apache/logs/error.log"
    TransferLog "C:/xampp/apache/logs/access.log"
</VirtualHost>

<VirtualHost 127.0.0.1:8081>
    ServerName omega.epicfailgu.co.uk
    ProxyPreserveHost on
    ProxyPass / http://localhost:8081/
    ProxyPassReverse / http://localhost:8081/

<Proxy *>
        Order deny,allow
        Allow from all
        Authtype Basic
        Authname "Password Required"
        AuthUserFile C:\xampp\.htpasswd
        Require valid-user
</Proxy>

</VirtualHost>

DocumentRoot“C:/xampp/htdocs”
服务器名www.epicfailgu.co.uk
服务器管理员webmaster@epicfailgu.co.uk
ErrorLog“C:/xampp/apache/logs/error.log”
TransferLog“C:/xampp/apache/logs/access.log”
ServerName omega.epicfailgu.co.uk
代理主机
ProxyPass/http://localhost:8081/
ProxyPassReverse/http://localhost:8081/
命令拒绝,允许
通融
Authtype Basic
Authname“需要密码”
AuthUserFile C:\xampp\.htpasswd
需要有效用户
但如果我去omega.gu.co.uk,它只指向我的主要网站

我实际上希望它指向一个运行在端口8081上的本地主机控制面板,并且我还需要它有密码保护