[精讚] [會員登入]
1273

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

你可能感興趣的文章

proxmox zfs 建立異地備份與還原 zfs最吸引人的地方就是可以建立快照並傳輸到遠端机器, 達到增量備份, 並且隨時從任一備份檔還原 完全不怕勒索病毒 將v

[web] 自訂模組-打字機與跑馬燈效果 自訂模組-打字機效果

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

[shell script] 批次判斷domain name 正解設定 判斷dns 正解設定

臺中市雲端校務系統與Windows AD帳號整合(6) 修改Windows AD 密碼原則

管理Google共用雲端硬碟 管理Google共用雲端硬碟

我有話要說

>>

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

訪客留言

[無留言]

隨機好文

[vue.js] 設定 content type 今天在wickt 端怎麼就是收不到vue.js 以post 傳過來的資料 找了好久才發現 application/jso

[vue.js] 動態的props 做parent-child components 雙向綁定 vue.js props components camel-case

download a file from spring boot controllers ownload a file from spring boot controllers

ArrayList 想移除特定值 想移出water, 使用lambda 的方式如下 List<String> fruits = new Arr

spring boot jpa 使用多個欄位排序 我有一entity 叫 team 資料欄下如下 @Id @GeneratedValue(strategy = Gener