plesk 10/11 内的 ProxyPass

Pet*_*ter 3 apache-http-server redirection plesk minecraft

我想重定向 apache2 中的某个文件夹。

我的网络服务器与 plesk 11 一起使用。

我跟着这个教程。它说我必须在这个文件中加入重定向规则/etc/apache2/sites-available/default。对于我的网络服务器,这个文件甚至不存在。我猜这是因为 plesk 的网站管理。但是只有这个文件:000-default. 我没有修改!

我还设法找到了我的域的配置文件。哪个位于这里

/var/www/vhosts/example.org/conf/last_httpd.include
Run Code Online (Sandbox Code Playgroud)

我想用 Apache 2“ProxyPass”解决我的问题。因为我认为这是解决重定向的最简单方法。

正如我发现的,我必须添加这一行

ProxyPass /folder/map/ http://www.google.de
Run Code Online (Sandbox Code Playgroud)

这不起作用。它以错误“403 forbidden”退出。请给我一个提示。谢谢!

Pet*_*ter 7

Plesk 10/11:

1. 为 apache2 创建您的个人配置

cd /var/www/vhosts/example.org
sudo touch conf/vhost.conf
sudo vim 
Run Code Online (Sandbox Code Playgroud)

2. 在那里插入你的指令

按下I并插入这些行

RewriteEngine On
ProxyPass /directory/subdir/ http://localhost:8123/
ProxyPassReverse /directory/subdir/ http://localhost:8123/
Run Code Online (Sandbox Code Playgroud)

Esc然后:写:wq然后按?

3.告诉apache使用配置

sudo /usr/local/psa/admin/bin/httpdmng --reconfigure-all
sudo service apache2 restart
Run Code Online (Sandbox Code Playgroud)

4. 你完成了。


Plesk 12

  • 以管理员身份登录
  • 选择订阅
  • 在控制面板中打开
  • 网络服务器设置
  • HTTP 的附加指令 && HTTPS 的附加指令:


RewriteEngine On
ProxyPass /directory/subdir/ http://localhost:8123/
ProxyPassReverse /directory/subdir/ http://localhost:8123/
Run Code Online (Sandbox Code Playgroud)


资料来源:
oli.new-lan.de
forum.parallels.com