0

我知道这要求太多,但我真的不明白。

我正在为我的服务器使用一个子域,例如 sub.domain.com。我可以通过输入 ssh root@sub.domain.com 通过 ssh 访问它。

我正在尝试在此服务器上使用 nextcloud,例如 cloud.domain.com。当我输入 sub.domain.com/nextcloud 时,我可以访问 nextcloud。我的conf文件是:

   upstream php-handler {
    server 127.0.0.1:9000;
    #server unix:/var/run/php5-fpm.sock;
}
server {
    listen 80;
    server_name sub.domain.com;
    # enforce https
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl;
    server_name sub.domain.com;

    ssl_certificate /etc/nginx/ssl/server.crt;
    ssl_certificate_key /etc/nginx/ssl/server.key;   

   # Add headers to serve security related headers
    # Before enabling Strict-Transport-Security headers please read into this
    # topic first.
    add_header Strict-Transport-Security "max-age=15768000;
    includeSubDomains; preload;";
    add_header X-Content-Type-Options nosniff;
    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Robots-Tag none;
    add_header X-Download-Options noopen;
    add_header X-Permitted-Cross-Domain-Policies none;

   # Path to the root of your installation
    root /usr/share/nextcloud/;

   location = /robots.txt {
       allow all;
       log_not_found off;
       access_log off;
   }

我正在尝试将 sub.domain.com 更改为 cloud.domain.com 但它不起作用。

我的错误在哪里?你们能帮帮我吗?

谢谢。

4

0 回答 0