Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 20/06/2019, à 16:24

cdevl

nextcloud

Bonjour,

J'ai suivi ce tuto et tout fonctionne très bien :https://www.linuxbabe.com/ubuntu/instal … nginx-lemp.

quand je veux accéder à nextcloud  je tape mon nom de domaine ( https://www.vpsmail.tech que j'ai chez ovh sur un vps avec ubuntu 18 ) il affiche ma page PhpMyAdmin ??

Pouvez vous m'aider ?

Merci à vous

voici mon fichier de config :

server {
    listen 80;
    server_name vpsmail.tech;

    # Add headers to serve security related headers
    add_header X-Content-Type-Options nosniff;
    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;

    #This header is already set in PHP, so it is commented out here.
    #add_header X-Frame-Options "SAMEORIGIN";

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

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

    # The following 2 rules are only needed for the user_webfinger app.
    # Uncomment it if you're planning to use this app.
    #rewrite ^/.well-known/host-meta /public.php?service=host-meta last;
    #rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json
    # last;

    location = /.well-known/carddav {
        return 301 $scheme://$host/remote.php/dav;
    }
    location = /.well-known/caldav {
       return 301 $scheme://$host/remote.php/dav;
    }

    location ~ /.well-known/acme-challenge {
      allow all;
    }

    # set max upload size
    client_max_body_size 512M;
    fastcgi_buffers 64 4K;

    # Disable gzip to avoid the removal of the ETag header
    gzip off;

    # Uncomment if your server is build with the ngx_pagespeed module
    # This module is currently not supported.
    #pagespeed off;

    error_page 403 /core/templates/403.php;
    error_page 404 /core/templates/404.php;

    location / {
       rewrite ^ /index.php$uri;
    }

    location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
       deny all;
    }
    location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
       deny all;
     }

    location ~ ^/(?:index|remote|public|cron|core/ajax/update|status|ocs/v[12]|updater/.+|ocs-provider/.+|core/templates/40[34])\.php(?:$|/) {
       include fastcgi_params;
       fastcgi_split_path_info ^(.+\.php)(/.*)$;
       fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
       fastcgi_param PATH_INFO $fastcgi_path_info;
       #Avoid sending the security headers twice
       fastcgi_param modHeadersAvailable true;
       fastcgi_param front_controller_active true;
       fastcgi_pass unix:/run/php/php7.2-fpm.sock;
       fastcgi_intercept_errors on;
       fastcgi_request_buffering off;
    }

    location ~ ^/(?:updater|ocs-provider)(?:$|/) {
       try_files $uri/ =404;
       index index.php;
    }

    # Adding the cache control header for js and css files
    # Make sure it is BELOW the PHP block
    location ~* \.(?:css|js)$ {
        try_files $uri /index.php$uri$is_args$args;
        add_header Cache-Control "public, max-age=7200";
        # Add headers to serve security related headers (It is intended to
        # have those duplicated to the ones above)
        add_header X-Content-Type-Options nosniff;
        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;
        # Optional: Don't log access to assets
        access_log off;
   }

   location ~* \.(?:svg|gif|png|html|ttf|woff|ico|jpg|jpeg)$ {
        try_files $uri /index.php$uri$is_args$args;
        # Optional: Don't log access to other assets
        access_log off;
   }
}

Hors ligne

#2 Le 20/06/2019, à 16:39

bruno

Re : nextcloud

Bonjour,

Quels sont tes autres hôtes virtuels ?
Retour de :

ls -l /etc/nginx/sites-enabled/

et contenu des fichiers. Voir aussi les éléments de configuration sous /etc/nginx/conf.d/

Hors ligne

#3 Le 20/06/2019, à 18:58

cdevl

Re : nextcloud

Merci à vous pour votre réponse.

au retour de cette commande j'ai ceci

ls -l /etc/nginx/sites-enabled/

: Total 0

En ce qui concerne mon fichier de configuration

sous /etc/nginx/conf.d/

nextcloud.conf

server {
    listen 80;
server {
    listen 80;
    server_name vpsmail.tech;

    # Add headers to serve security related headers
    add_header X-Content-Type-Options nosniff;
    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;

    #This header is already set in PHP, so it is commented out here.
    #add_header X-Frame-Options "SAMEORIGIN";

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

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

    # Add headers to serve security related headers
    add_header X-Content-Type-Options nosniff;
    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;

    #This header is already set in PHP, so it is commented out here.
    #add_header X-Frame-Options "SAMEORIGIN";

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

    location = /robots.txt {
        allow all;

et le fichier default.conf

server {
  listen 80;
  listen [::]:80;
  server_name _;
  root /usr/share/nginx/html/;
  index index.php index.html index.htm index.nginx-debian.html;

  location / {
    try_files $uri $uri/ /index.php;
  }

  location ~ \.php$ {
    fastcgi_pass unix:/run/php/php7.2-fpm.sock;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    include snippets/fastcgi-php.conf;
  }


 # A long browser cache lifetime can speed up repeat visits to your page
  location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
       access_log        off;
       log_not_found     off;
       expires           360d;
  }

  # disable access to hidden files
  location ~ /\.ht {
      access_log off;
      log_not_found off;
      deny all;
  }
}

et la status avec : sudo systemctl status nginx donne ceci :

 nginx.service - A high performance web server and a reverse proxy server
   Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
  Drop-In: /etc/systemd/system/nginx.service.d
           └─override.conf
   Active: active (running) since Thu 2019-06-20 16:53:08 CEST; 3h 3min ago
     Docs: man:nginx(8)
  Process: 1690 ExecStop=/sbin/start-stop-daemon --quiet --stop --retry QUIT/5 --pidfile /run/nginx.pid (code=exited, status=0/SUCCESS)
  Process: 1821 ExecReload=/usr/sbin/nginx -g daemon on; master_process on; -s reload (code=exited, status=0/SUCCESS)
  Process: 1712 ExecStartPost=/bin/sleep 0.1 (code=exited, status=0/SUCCESS)
  Process: 1706 ExecStart=/usr/sbin/nginx -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
  Process: 1691 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=0/SUCCESS)
 Main PID: 1710 (nginx)
    Tasks: 2 (limit: 2303)
   CGroup: /system.slice/nginx.service
           ├─1710 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
           └─1822 nginx: worker process

juin 20 16:53:07 vps693490 systemd[1]: Starting A high performance web server and a reverse proxy server...
juin 20 16:53:08 vps693490 nginx[1691]: nginx: [warn] conflicting server name "vpsmail.tech" on 0.0.0.0:80, ignored
juin 20 16:53:08 vps693490 nginx[1706]: nginx: [warn] conflicting server name "vpsmail.tech" on 0.0.0.0:80, ignored
juin 20 16:53:08 vps693490 systemd[1]: Started A high performance web server and a reverse proxy server.
juin 20 17:11:07 vps693490 systemd[1]: Reloading A high performance web server and a reverse proxy server.
juin 20 17:11:07 vps693490 nginx[1821]: nginx: [warn] conflicting server name "vpsmail.tech" on 0.0.0.0:80, ignored
juin 20 17:11:07 vps693490 systemd[1]: Reloaded A high performance web server and a reverse proxy server.

Hors ligne

#4 Le 20/06/2019, à 20:11

bruno

Re : nextcloud

Ce n'est pas une bonne pratique de mettre ces fichiers sous conf.d hmm
Pour ton fichier nextcloud.conf, il est complètement en vrac (erreur de copier/coller ?). Cela m'étonne même que nginx accepte de se lancer.
Déjà cette erreur :

nginx: [warn] conflicting server name "vpsmail.tech" on 0.0.0.0:80, ignored

car cette directive est présente deux fois dans deux sections server différentes

server_name vpsmail.tech;

Je te laisse corriger et relancer nginx.

Hors ligne

#5 Le 20/06/2019, à 21:08

cdevl

Re : nextcloud

désoler j'ai fais une erreur dans mon copier coller mon fichier nextcloud.conf est bien comme ceci :

je suis novice et j'ai louer un vps chez ovh avec ubuntu server 18 et je voudrais installer nextcloud et je n'y parviens pas si vous avez un guide ou explications pas à pas pour installer nextcloud cela m'aiderais beaucoup.

encore merci de votre aide

server {
    listen 80;
    server_name vpsmail.tech;

    # Add headers to serve security related headers
    add_header X-Content-Type-Options nosniff;
    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;

    #This header is already set in PHP, so it is commented out here.
    #add_header X-Frame-Options "SAMEORIGIN";

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

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

Dernière modification par cdevl (Le 20/06/2019, à 21:08)

Hors ligne

#6 Le 20/06/2019, à 21:16

cdevl

Re : nextcloud

quand je tape : https://vpsmail.tech/ je tombe sur ma page phpMyadmin je ne comprend pas pourquoi je n'arrive pas sur nextcloud ?


bruno a écrit :

Ce n'est pas une bonne pratique de mettre ces fichiers sous conf.d hmm
Pour ton fichier nextcloud.conf, il est complètement en vrac (erreur de copier/coller ?). Cela m'étonne même que nginx accepte de se lancer.
Déjà cette erreur :

nginx: [warn] conflicting server name "vpsmail.tech" on 0.0.0.0:80, ignored

car cette directive est présente deux fois dans deux sections server différentes

server_name vpsmail.tech;

Je te laisse corriger et relancer nginx.

Hors ligne

#7 Le 20/06/2019, à 22:00

bruno

Re : nextcloud

Ce n'est pas le même fichier qu'en #1…

Hors ligne

#8 Le 21/06/2019, à 00:04

cdevl

Re : nextcloud

Avez vous un guide à me conseiller ?

Hors ligne

#9 Le 21/06/2019, à 08:20

bruno

Re : nextcloud

La documentation nextcloud-serveur d'ubuntu-fr basée sur Apache.

La documentation officielle de Nextcloud pour une installation avec Nginx.

N.B. : l'installation et la configuration d'un serveur web et d'une application comme nextcloud ne se réalise pas à coup de copier/coller de tutos plus ou moins mal foutus. Il faut lire les documentations et comprendre ce que l'on fait. Et idéalement expérimenté sur sa propre machine avent de se lancer sur un serveur dédié.

Dernière modification par bruno (Le 21/06/2019, à 08:22)

Hors ligne