Apache2 Reverse Proxy

Configure Apache2 as Reverse Proxy

create a proxy VirtualHost file called Apache2Proxy.conf

sudo vim /etc/apache2/sites-available/Apache2Proxy.conf

Then add the following block of codes in the Apache2Proxy.conf file and then save it.

<VirtualHost *:80> ServerName example.com #ServerAlias www.example.com ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined ProxyRequests Off <Proxy *> Order deny,allow Allow from all </Proxy> ProxyPass / http://127.0.0.1:8080/ #IP Address ProxyPassReverse / http://127.0.0.1:8080/ <Location /> Order allow,deny Allow from all </Location> </VirtualHost>
Code language: HTML, XML (xml)

Enable Apache2 Proxy

Enable its HTTP proxy modules.

sudo a2enmod proxy sudo a2enmod proxy_http sudo a2enmod proxy_balancer sudo a2enmod lbmethod_byrequests

Now enable the VirtualHost site and restart Apache2 to enable reload the Apache2 module’s configuration.

sudo a2ensite Apache2Proxy.conf sudo systemctl restart apache2.service
Code language: CSS (css)

Enable the SSL

sudo a2enmod ssl

Restart Apache2

sudo systemctl restart apache2.service
Code language: CSS (css)

No Comments

Send Comment Edit Comment


|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
Previous
Next