Apache2,2 个网站,1 个常规且具有身份验证,另外 1 个具有重写规则,用于将域名传递到不同端口上的另一个网站

Apache2,2 个网站,1 个常规且具有身份验证,另外 1 个具有重写规则,用于将域名传递到不同端口上的另一个网站

我有一个 ubuntu apache2,我已经设置了 quickbox 并且已经运行了一段时间,我想从 plex 切换到 jellyfin,但是 jellyfin 在端口 8086 上运行自己的 web 服务器,所以我想简单一点

LoadModule rewrite_module modules/mod_rewrite.so
SSLPassPhraseDialog  builtin
SSLSessionCache         shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout  3600
#SSLMutex default
SSLRandomSeed startup file:/dev/urandom  256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin

<VirtualHost *:443>
  ServerName jelly.WEBSITE.com
  ServerAlias www.jelly.WEBSITE.com

RewriteEngine on

RewriteCond %{HTTP_HOST} =jelly.WEBSITE.com
RewriteRule ^ http://IP:8096/$1 [P]
RewriteRule ^ http://%{HTTP_HOST}%{REQUEST_URI} [END,NE,R=permanent]


ProxyPassReverse "/" "http://IP:8096/"

RewriteCond %{REQUEST_URI} =/socket
RewriteRule ^ ws://IP:8096/$1 [P]

ProxyPassReverse "/socket" "ws://IP:8096/socket"
  ProxyPassReverse "/socket" "ws://IP:8096/socket"  
        ErrorLog ${APACHE_LOG_DIR}/jelly.WEBSITE.com.error.log

        # Possible values include: debug, info, notice, warn, error, crit,
        # alert, emerg.
        LogLevel warn 
  ErrorLog ${APACHE_LOG_DIR}/jelly.WEBSITE.com.error.log

</VirtualHost>

<VirtualHost *:80>
        ServerName box.WEBSITE.com
        DocumentRoot "/srv/rutorrent/home"
        <Directory "/srv/rutorrent/home/">
                Options Indexes FollowSymLinks
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all
        AuthType Digest
        AuthName "rutorrent"
        AuthUserFile '/etc/htpasswd'
        Require valid-user
        </Directory>
SCGIMount /cyber 127.0.0.1:41041
RewriteEngine on
RewriteCond %{SERVER_NAME} =box.WEBSITE.com
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>
Options +Indexes +MultiViews +FollowSymLinks
ServerName box.WEBSITE.com
SSLEngine on
        DocumentRoot "/srv/rutorrent/home"
        <Directory "/srv/rutorrent/home/">
                Options +Indexes +FollowSymLinks +MultiViews
                AllowOverride All AuthConfig
                Order allow,deny
                Allow from all
        AuthType Digest
        AuthName "rutorrent"
        AuthUserFile '/etc/htpasswd'
        Require valid-user
        </Directory>
        SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2
        SSLHonorCipherOrder On
        SSLCipherSuite ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:RSA+AESGCM:RSA+AES:!aNULL:!MD5:!DSS
        SetEnvIf User-Agent ".*MSIE.*"nokeepalive ssl-unclean-shutdown downgrade-1.0 force-response-1.0
        SCGIMount /cyber 127.0.0.1:41041
        ServerName box.WEBSITE.com
SSLCertificateFile /etc/letsencrypt/live/box.WEBSITE.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/box.WEBSITE.com/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
SCGIMount /cyber 127.0.0.1:41041

在 bard.google 的帮助下尝试了几天,但 jelly 一直从盒子中获取身份验证,而且 jelly 随机获得了太多的重定向。

相关内容