0

I know this asks too much but I really don't get it.

I am using a subdomain for my server like sub.domain.com. I can reach it with ssh with typing ssh root@sub.domain.com.

I am trying use nextcloud on this server like cloud.domain.com. I can reach nextcloud when I type sub.domain.com/nextcloud. My conf file is:

   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;
   }

I am trying to change sub.domain.com to cloud.domain.com but it doesn't working.

Where is my mistake? Can you guys help me?

Thanks.

Jay Blanchard
  • 34,243
  • 16
  • 77
  • 119

0 Answers0