I'm new here. Hello everyone! I don't speak English (sorry) but I'll translate all your answers.
I work with Debian 11, and Apache.
root@1150-SRV:~# uname -a
Linux 1150-SRV 6.1.0-0.deb11.7-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.20-2~bpo11+1 (2023-04-23) x86_64 GNU/Linux
sub-domain : msrv.brusses.fr
In my box (Freebox), I've redirected ports 80 and 443 to the server machine.
1/ Only the server can log in at the URL msrv.brusses.fr, the local IP of the machine, and the public IP of the server.
Other workstations: no. Only the public IP. And even in the local network.
2/ Security alert on public IP and URL browsers. All workstations, including the server.
3/ The Owncloud client works, BUT only on the public IP.
NOT on the subdomain URL.
4/ The ping works on the server : ping msrv.brusses.fr but NOT on the other workstations. For them, only the public IP.
Comman dused :
[code]
certbot -d msrv.brusses.fr --certonly --manual --prefered-challenge-dns
[/code]
the file /etc/hosts
127.0.0.1 localhost
Public IP msrv.brusses.fr
Local Ip msrv.brusses.fr
local IP 1150-SRV.brusses.fr 1150-SRV
# The following lines are desirable for IPv6 capable hosts
# Les lignes suivantes sont souhaitables pour les hôtes compatibles IPv6
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
the virtual host
<VirtualHost *:80>
ServerName www.msrv.brusses.fr
ServerAlias www.msrv.brusses.fr # <<== Utile ?
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/owncloud
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.msrv.brusses.fr
RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
AllowOverride all
</Directory>
<VirtualHost *:443>
ServerName www.msrv.brusses.fr
ServerAlias www.msrv.brusses.fr # <<== Utile ?
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/owncloud
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/msrv.brusses.fr/cert.pem
SSLCertificateKeyFile /etc/letsencrypt/live/msrv.brusses.fr/privkey.pem
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /var/www/>
Options FollowSymLinks
AllowOverride Limit Options FileInfo
DirectoryIndex index.php
Require all granted
RewriteEngine on
RewriteCond %{SERVER_NAME} =www.msrv.brusses.fr
RewriteRule ^ http://%{SERVER_NAME}%{REQUEST_URI} [END,QSA,R=permanent]
AllowOverride all
</Directory>
In /etc/apache2/apache2.conf :
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /usr/share>
AllowOverride None
Require all granted
</Directory>
#<Directory /srv/msrv/brusses.fr>
# Require host msrv.brusses.fr.conf
# Options Indexes FollowSymLinks
# AllowOverride None
# Require all granted
#</Directory>
<Directory /var/www/html/owncloud>
Require host msrv.brusses.fr.conf
# Options Indexes FollowSymLinks # CONSEILLE DE COMMENTER POUR RAISONS DE SECURITE
AllowOverride all
# AllowOverride None
Require all granted
</Directory>
Where did I go wrong? Thanks a lot !