SSL mess google crawl page from another domain

2 posts / 0 new
Last post
#1 Wed, 02/15/2017 - 12:21
riri1310

SSL mess google crawl page from another domain

HI all,

I have several domains on the same VM with one IP affect to this VM, some domains have SSL enable and some no. Here is the problem :

I notice the Google crawl page url from one domain with SSL and affect them to another domain.

For example here is the SSL website : https://www.tendance-prenom.fr (this domain is my default domain)

with page structure like this :

https://www.tendance-prenom.fr/fille/ines/
https://www.tendance-prenom.fr/fille/jeanne/
...

And I notice that google index one of my domain (allolesparents.fr without SSL) with the same structure and give link to the previous domain: https://www.google.fr/search?hl=fr&source=hp&q=site%3Aallolesparents%2Ff...

https://allolesparents.fr/fille/zeline/
https://allolesparents.fr/fille/zelie/
...

Do you know what happen I guess there something wrong somewhere but what!

Here is my virtualhost conf

<VirtualHost *:80>
SuexecUserGroup "#1007" "#1007"
ServerName tendance-prenom.fr
ServerAlias www.tendance-prenom.fr
ServerAlias webmail.tendance-prenom.fr
ServerAlias admin.tendance-prenom.fr
ServerAlias tendance-prenom.com
ServerAlias www.tendance-prenom.com
DocumentRoot /home/tendance-prenom/public_html
ErrorLog /var/log/virtualmin/tendance-prenom.fr_error_log
CustomLog /var/log/virtualmin/tendance-prenom.fr_access_log combined
ScriptAlias /cgi-bin/ /home/tendance-prenom/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/tendance-prenom/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.0
FCGIWrapper /home/tendance-prenom/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/tendance-prenom/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/tendance-prenom/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.tendance-prenom.fr
RewriteRule ^(.*) https://tendance-prenom.fr:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.tendance-prenom.fr
RewriteRule ^(.*) https://tendance-prenom.fr:10000/ [R]

#rewrite .com .fr
RewriteCond %{HTTP_HOST} ^(.+\.)?tendance-prenom\.com$
RewriteRule ^(.*)$ https://%1tendance-prenom.fr$1 [R=301,L]

#rewrite ssl
RewriteCond %{HTTP_HOST} ^(.+\.)?tendance-prenom\.fr$
RewriteRule ^(.*)$ https://%1tendance-prenom.fr$1 [R=301,L]

RemoveHandler .php
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824
IPCCommTimeout 3601
</VirtualHost>
<VirtualHost 178.33.42.10:443>
SuexecUserGroup "#1007" "#1007"
ServerName tendance-prenom.fr
ServerAlias www.tendance-prenom.fr
ServerAlias webmail.tendance-prenom.fr
ServerAlias admin.tendance-prenom.fr
ServerAlias tendance-prenom.com
ServerAlias www.tendance-prenom.com
DocumentRoot /home/tendance-prenom/public_html
ErrorLog /var/log/virtualmin/tendance-prenom.fr_error_log
CustomLog /var/log/virtualmin/tendance-prenom.fr_access_log combined
ScriptAlias /cgi-bin/ /home/tendance-prenom/cgi-bin/
DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/tendance-prenom/public_html>
Options -Indexes +IncludesNOEXEC +SymLinksIfOwnerMatch +ExecCGI
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
AddType application/x-httpd-php .php
AddHandler fcgid-script .php
AddHandler fcgid-script .php7.0
FCGIWrapper /home/tendance-prenom/fcgi-bin/php7.0.fcgi .php
FCGIWrapper /home/tendance-prenom/fcgi-bin/php7.0.fcgi .php7.0
</Directory>
<Directory /home/tendance-prenom/cgi-bin>
allow from all
AllowOverride All Options=ExecCGI,Includes,IncludesNOEXEC,Indexes,MultiViews,SymLinksIfOwnerMatch
Require all granted
</Directory>
RewriteEngine on
RewriteCond %{HTTP_HOST} =webmail.tendance-prenom.fr
RewriteRule ^(.*) https://tendance-prenom.fr:20000/ [R]
RewriteCond %{HTTP_HOST} =admin.tendance-prenom.fr
RewriteRule ^(.*) https://tendance-prenom.fr:10000/ [R]

#rewrite .com .fr
RewriteCond %{HTTP_HOST} ^(.+\.)?tendance-prenom\.com$
RewriteRule ^(.*)$ https://%1tendance-prenom.fr$1 [R=301,L]

RemoveHandler .php
RemoveHandler .php7.0
FcgidMaxRequestLen 1073741824
SSLEngine on
SSLCertificateFile /home/tendance-prenom/ssl_certificates/cert.pem
SSLCertificateKeyFile /home/tendance-prenom/ssl_certificates/privkey.pem
SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1
SSLCACertificateFile /home/tendance-prenom/ssl_certificates/fullchain.pem
IPCCommTimeout 3601
</VirtualHost>
Thu, 02/16/2017 - 04:33
riri1310

Finally I made a small trick to resolve this problem but don't know if it's right.

In my VM i setup a ghost virtual server with SSL enable and define it as the default server, so it's a kind of catch up error domain... So now all weird domain url come with a nice 404 error.

What do you think, is it a good way to do that?

Thanks

Topic locked