[精讚] [會員登入]
1786

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

你可能感興趣的文章

openldap資料移到 docker 拉docker 上的 image 回來 docker pull osixia/openldap 在正在運行的openld

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

windows 使用 command 移除程式 使用 command 移除程式

資料表更改為多個primary key, MariaDB [database]> describe TABLENAME; 想由本來是兩個PRIMARY KE

雲端校務系統與OPENLDAP帳號整合(2) openldap,雲端校務

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

隨機好文

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

將google試算表當作簡易資料庫,利用Google apps cript 在網頁上操作查詢 將google試算表當作簡易資料庫,利用apps cript 在網頁上操作查詢 若我有一試算表資料 縣市 status

刪除資料夾內的檔案 lambda 一行文 Arrays.stream(new File("/folder/path").

keycloak 透過java client lib新增user 使用keycloak-admin-client lib maven <dependency> <gro

spring boot 3 建立 Basic Authentication 參考以下網站, 建立一個http basic authentication 為例 https://www.geeksfo