[精讚] [會員登入]
1468

apache 反向代理 80轉443轉8080

apache, proxy pass

分享此文連結 //n.sfs.tw/12281

分享連結 apache 反向代理 80轉443轉8080@igogo
(文章歡迎轉載,務必尊重版權註明連結來源)
2019-10-25 11:48:08 最後編修
2018-03-21 14:47:08 By igogo
 

apache 服務 80 轉443 再轉 8080

 

以centos 7 為平臺

 

/etc/httpd/conf.d/ssoid.conf

#Listen 443 https
RewriteEngine On
# This will enable the Rewrite capabilities
RewriteCond %{HTTPS} !=on
# This checks to make sure the connection is not already HTTPS

<VirtualHost *:80>
    DocumentRoot /var/www/html
    ServerName ssoid.tc.edu.tw
    <Directory "/var/www/html">
        Options -Indexes
        AllowOverride All
        Require all granted
    </Directory>
# RewriteCond %{HTTPS} off
# RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
RewriteEngine on
RewriteCond %{SERVER_NAME} =ssoid.tc.edu.tw
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

 

所有輸入ssoid.tc.edu.tw 者  皆轉向 https

 

/etc/httpd/conf.d/ssl.conf

<VirtualHost _default_:443>

略...

 <Location />
     ProxyPass "http://127.0.0.1:8080/"
     ProxyPassReverse "http://127.0.0.1:8080/"
     Order deny,allow
     Allow from all
  </Location>


 <Location /app2>
     ProxyPass "http://127.0.0.1:8081/"
     ProxyPassReverse "http://127.0.0.1:8081/"
     Order deny,allow
     Allow from all
  </Location>

</VirtualHost>

 

https://xxx/app2 ;; 轉到內部的8081服務

 

END

你可能感興趣的文章

臺中市雲端校務系統與Windows AD帳號整合(5) 安裝java環境

臺中市雲端校務系統與Windows AD帳號整合(3) LDAP的基本概念

網站無障礙規範 https://accessibility.ncc.gov.tw/News/Detail/3238?Category=4

使用expect及 openssl 產生SSL 憑證簽署要求 每年都要製做tls 憑證 二十幾張, 此語法利用expect 產生私錀及憑證請求檔 #!/usr/bin/expect

批次檢查tls憑證是否過期 tls憑證一年一簽, 台中市有三百多所學校, 寫成一檔案 skaps.tc.edu.tw www.skaps.tc.ed

在docker裡跑spring boot+mongo(一) 系統安裝docker ce centos7 + docker ce https://docs.docker.com/in

我有話要說

>>

限制:留言最高字數1000字。 限制:未登入訪客,每則留言間隔需超過10分鐘,每日最多5則留言。

訪客留言

[無留言]

隨機好文

java-身份証字號驗証 FormatCheck.java public class FormatCheck { private volatile

vue.js component 在parent與child 傳值 component 在parent與child 傳值

vim 特定範圍行數開頭加上# 註解 vim 特定範圍行數開頭加上# 註解

在docker裡跑spring boot+mongo(二) 使用docker-compose 管理多個container 前篇使用docker run 一次建一個container

[javascript] 將角色物件放到清單中,並依序讀出每個角色的X值 參考在scratch中建立三個角色並且給定值 http://n.sfs.tw/content/index/14716 一