본문 바로가기
서버/리눅스 서버

아파치 웹서버 (apache2) 프록시 패스 예시

by ㅋㅋ잠자 2017. 4. 26.
반응형

안녕하세요. 도정진입니다.


이번에는 설명글이 아닌 백업글을 작성하려고 합니다.


1. 비트 토렌트 싱크


<Virtualhost *:80>

ProxyRequests Off

ServerName btsync.mydomain.com

<Proxy *>

Order Deny,allow

Allow from all

</Proxy>

ProxyPass / http://192.168.0.2:1111/

ProxyPassReverse / http://192.168.0.2:1111/       

</Virtualhost>


2. h5ai 


<VirtualHost *:80>

ServerName download.mydomain.com

ServerAdmin djj9404@gmail.com

DocumentRoot /media/92e78b59-6ef0-42eb-94f8-03843e5645a8/htdocs/download

DirectoryIndex index.html index.php /_h5ai/public/index.php

</VirtualHost>


3. emby-server


<Virtualhost *:80>

ProxyRequests Off

ServerName emby.mydomain.com

<Proxy *>

Order Deny,allow

Allow from all

</Proxy>

ProxyPass / http://192.168.0.2:8096/

ProxyPassReverse / http://192.168.0.2:8096/       

</Virtualhost>


4. guacamole remote


<Virtualhost *:80>

ServerName remote.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>

   

<VirtualHost *:443>

ServerName remote.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

   

ProxyPreserveHost On

SSLProxyEngine On

ProxyRequests Off

RequestHeader set Front-End-Https "On"

   

<Location /> 

Order allow,deny

Allow from all

ProxyPass http://127.0.0.1:8080/guacamole/ max=20 flushpackets=on

ProxyPassReverse http://127.0.0.1:8080/guacamole/

ProxyPassReverseCookiePath /guacamole/ /

</Location>

<Location /websocket-tunnel>

Order allow,deny

    Allow from all

ProxyPass ws://127.0.0.1:8080/guacamole/websocket-tunnel

ProxyPassReverse ws://127.0.0.1:8080/guacamole/websocket-tunnel

</Location>

</Virtualhost>


5. 공유기 설정창


<Virtualhost *:80>

ServerName iptime.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

ServerName iptime.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

   

ProxyPreserveHost On

SSLProxyEngine On

ProxyRequests Off

RequestHeader set Front-End-Https "On"

   

<Location /> 

Order allow,deny

Allow from all

ProxyPass http://192.168.0.1/

ProxyPassReverse http://192.168.0.1/

</Location>

</Virtualhost>


6. openmediavault web ui


<Virtualhost *:80>

ServerName omv.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

ServerName omv.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

   

ProxyPreserveHost On

SSLProxyEngine On

ProxyRequests Off

RequestHeader set Front-End-Https "On"

   

<Location /> 

Order allow,deny

Allow from all

ProxyPass http://192.168.0.2:8000/

ProxyPassReverse http://192.168.0.2:8000/

</Location>

</Virtualhost>


7. phpmyadmin


<Virtualhost *:80>

ServerName myadmin.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

ServerName myadmin.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

ProxyPreserveHost On

SSLProxyEngine On

RequestHeader set Front-End-Https "On"

DocumentRoot /media/92e78b59-6ef0-42eb-94f8-03843e5645a8/htdocs/phpmyadmin

DirectoryIndex index.html index.php /_h5ai/server/php/index.php

</Virtualhost>


8. subsonic


<Virtualhost *:80>

ProxyRequests Off

ServerName subsonic.mydomain.com

<Proxy *>

Order Deny,allow

Allow from all

</Proxy>

ProxyPass / http://192.168.0.2:4040/

ProxyPassReverse / http://192.168.0.2:4040/       

</Virtualhost>


9. Spread WebRTC


<Virtualhost *:80>

ServerName webrtc.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

ServerName webrtc.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

   

ProxyPreserveHost On

SSLProxyEngine On

ProxyRequests Off

RequestHeader set X-Forwarded-Proto 'https' env=HTTPS

ProxyVia On


   

<Location /> 

Order allow,deny

Allow from all

ProxyPass http://127.0.0.1:8089/

ProxyPassReverse /

</Location>


<Location /ws>

Order allow,deny

Allow from all

ProxyPass ws://127.0.0.1:8089/ws

</Location>


</Virtualhost>


10. phpvirtualbox


<Virtualhost *:80>

ServerName vbox.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

ServerName vbox.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

ProxyPreserveHost On

SSLProxyEngine On

RequestHeader set Front-End-Https "On"

DocumentRoot /media/92e78b59-6ef0-42eb-94f8-03843e5645a8/htdocs/phpvirtualbox

DirectoryIndex index.html index.php /_h5ai/server/php/index.php

</Virtualhost>


11. tvheadend transcode 서버 (서브도메인에 또 서브도메인


<Virtualhost *:80>

ServerName transcode.tvheadend.mydomain.com

RewriteEngine On

RewriteCond %{HTTPS} off

RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

</VirtualHost>


<VirtualHost *:443>

ServerName transcode.tvheadend.mydomain.com

ServerAlias ""

SSLEngine On

SSLCertificateFile /etc/apache2/ssl/apache.crt

SSLCertificateKeyFile /etc/apache2/ssl/apache.key

SSLProtocol +TLSv1.2

   

ProxyPreserveHost On

SSLProxyEngine On

ProxyRequests Off

RequestHeader set Front-End-Https "On"

   

<Location /> 

Order allow,deny

Allow from all

ProxyPass http://192.168.0.2:9981/

ProxyPassReverse http://192.168.0.2:9981/

</Location>

</Virtualhost>


감사합니다.

반응형

댓글