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.