![Apache2,2 个网站,1 个常规且具有身份验证,另外 1 个具有重写规则,用于将域名传递到不同端口上的另一个网站](https://linux22.com/image/1197546/Apache2%EF%BC%8C2%20%E4%B8%AA%E7%BD%91%E7%AB%99%EF%BC%8C1%20%E4%B8%AA%E5%B8%B8%E8%A7%84%E4%B8%94%E5%85%B7%E6%9C%89%E8%BA%AB%E4%BB%BD%E9%AA%8C%E8%AF%81%EF%BC%8C%E5%8F%A6%E5%A4%96%201%20%E4%B8%AA%E5%85%B7%E6%9C%89%E9%87%8D%E5%86%99%E8%A7%84%E5%88%99%EF%BC%8C%E7%94%A8%E4%BA%8E%E5%B0%86%E5%9F%9F%E5%90%8D%E4%BC%A0%E9%80%92%E5%88%B0%E4%B8%8D%E5%90%8C%E7%AB%AF%E5%8F%A3%E4%B8%8A%E7%9A%84%E5%8F%A6%E4%B8%80%E4%B8%AA%E7%BD%91%E7%AB%99.png)
我有一个 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 随机获得了太多的重定向。