首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >反向代理(Apache)下一次云管理

反向代理(Apache)下一次云管理
EN

Stack Overflow用户
提问于 2020-11-21 09:34:08
回答 1查看 1.5K关注 0票数 1

我一直在试图在反向代理的后面更改我的下一个云。它以前在没有反向代理的情况下有效。但是我想把它移到这个反向代理后面(带通配卡证书)。因此,今天我做了一个新的安装,但仍然没有运气。也许有人能帮我。

Ubuntu: 20.01用snap安装LTS Nexcloud (Nextcloud 20)

以下命令:

代码语言:javascript
复制
$ sudo snap install nextcloud
$ sudo nextcloud.manual-install admin ###password###
$ sudo snap set nextcloud ports.http=81
$ sudo nextcloud.occ config:system:set trusted_domains 0 --value=https://cloud.mydomain.com
$ sudo snap connect nextcloud:removable-media
$ sudo nano /var/snap/nextcloud/current/nextcloud/config/config.php

->我将数据目录更改为我使用的目录

$ sudo /etc/apache2/sites Avail-default.conf->,这里我粘贴了您的代码片段。在这里,我显示了我的完整的1000-default.conf(因为我认为问题可能在这里)。Ps:我还运行了一个jellyfin @ jellyfin.mydomain.nl (在works上)。在我的主机服务器上,我输入了2个CNAME条目: 1=、cloud@mydomain.nl和2=jellyfin@mydomain.nl

============

代码语言:javascript
复制
<VirtualHost *:80>
ServerName mydomain.nl
ServerAdmin webmaster@mydomain.nl
DocumentRoot /var/www/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<VirtualHost *:80>
ServerName jellyfin.mydomain.nl

# Uncomment for HTTP to HTTPS redirect
# Redirect permanent / https://DOMAIN_NAME

ErrorLog /var/log/apache2/DOMAIN_NAME-error.log
CustomLog /var/log/apache2/DOMAIN_NAME-access.log combined

If you are not using a SSL certificate, replace the ‘redirect’
line above with all lines below starting with ‘Proxy’
ServerName jellyfin.mydomain.nl # This folder exists just for certbot(You may have to create it, chown and chm> DocumentRoot /var/www/html/jellyfin/public_html

ProxyPreserveHost On

# Letsencrypt's certbot will place a file in this folder when updating/verifyi>
# This line will tell apache to not to use the proxy for this folder.
ProxyPass /.well_known/ !

ProxyPass "/socket" "ws://127.0.0.1:8096/socket"
ProxyPassReverse "/socket" "ws://127.0.0.1:8096/socket"

ProxyPass "/" "http://127.0.0.1:8096/"
ProxyPassReverse "/" "http://127.0.0.1:8096/"

SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/mydomain.nl/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mydomain.nl/privkey.pem
Protocols h2 http/1.1

# Enable only strong encryption ciphers and prefer versions with Forward Secre>
SSLCipherSuite HIGH:RC4-SHA:AES128-SHA:!aNULL:!MD5
SSLHonorCipherOrder on

Disable insecure SSL and TLS versions

SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1

ErrorLog /var/log/apache2/jellyfin.mydomain.nl-error.log
CustomLog /var/log/apache2/jellyfin.mydomain.nl-access.log combined

nextcloud

<VirtualHost *:80>
ServerName cloud.mydomain.nl
ServerAdmin webmaster@mydomain.nl
ProxyPreserveHost On
ProxyRequests Off
RewriteEngine On
RewriteRule ^/.well-known/carddav http://%{SERVER_NAME}/remote.php/dav/ [>
RewriteRule ^/.well-known/caldav http://%{SERVER_NAME}/remote.php/dav/ [R>
RewriteRule ^/.well-known/host-meta http://%{SERVER_NAME}/public.php?serv>
RewriteRule ^/.well-known/host-meta.json http://%{SERVER_NAME}/public.ph>
RewriteRule ^/.well-known/webfinger http://%{SERVER_NAME}/public.php?serv>
ProxyPass / http://localhost:81/
ProxyPassReverse / http://localhost:81/
vim: syntax=apache ts=4 sw=4 sts=4 sr noet

======================

如果我输入https://cloud.mydomain.nl,它会将我重定向到标准的apache,它运行在80个端口的网站上。

我真的希望你能帮我,因为这让我发疯了!非常感谢!

EN

回答 1

Stack Overflow用户

发布于 2022-09-07 16:06:12

我知道这是个老职位,但我是在找别的东西的时候找到的。

我认为这是因为您没有在443上应答的conf文件。您需要一个封装在以下文件中的conf文件:

代码语言:javascript
复制
<VirtualHost *:443></VirtualHost *:443>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64941638

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档