ubuntu下安装apache httpd + mod_proxy

1.安装httpd

sudo apt-get install apache2

2.安装mod_proxy

cd /etc/apache2/mods-available

sudo a2enmod proxy_http

3.配置一下mod_proxy

    修改/etc/apache2/sites-available/default

  

    加入

    ProxyPass / http://localhost:8781/

    ProxyPassReverse / http://localhost:8781/

    修改/etc/apache2/mods-enabled/proxy.conf

    把"deny from all" 改成 "allow from all"  #如果不改这个,浏览器就会说“You don’t have permission to access…”

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.