
17th May 2012, 12:35
|
|
Member
|
|
Join Date: Aug 2008
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Already checked - both sites have in ssl directory own certificates and both have set these certificate in vhost. Do you want screens of vhosts and folders?
|

18th May 2012, 16:34
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
Yes, that would be great (BTW: you don't have to create screnshots - you can simply copy&paste from PuTTY).
|

20th May 2012, 21:51
|
|
Member
|
|
Join Date: Aug 2008
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Domain 1 SSL folder:
Code:
root@server:/var/www/domain1.cz/ssl# dir
domain1.crt domain1.cz.key domain1.key.org
domain1.csr domain1.cz.key.bak domain1.cz.key.org.bak
Domain 2 SSL folder:
Code:
root@server:/var/www/domain2.cz/ssl# dir
domain2.crt domain2.csr domain2.key domain2.key.org
If i try https://domain2 -> I get SSL cert. from domain1
For domain1 works SSL cerft. from domain1 (right)
|

21st May 2012, 10:49
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
Can you post both vhost configurations?
|

21st May 2012, 12:37
|
|
Member
|
|
Join Date: Aug 2008
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Domain 1
Code:
<Directory /var/www/domain1.cz>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domain1.cz/web
ServerName domain1.cz
ServerAlias www.domain1.cz
ServerAdmin webmaster@domain1.cz
ErrorLog /var/log/ispconfig/httpd/domain1.cz/error.log
Alias /error/ "/var/www/domain1.cz/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domain1.cz/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web82/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain1.cz"
php_admin_value upload_tmp_dir /var/www/clients/client3/web82/tmp
php_admin_value session.save_path /var/www/clients/client3/web82/tmp
# PHPIniDir /var/www/conf/web82
php_admin_value open_basedir /var/www/clients/client3/web82/web:/var/www/clients/client3/web82/tmp:/var/www/domain1.cz/web:/srv/www/domain1.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyad$
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web82 client3
</IfModule>
<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client3/web82/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client3/web82/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/domain1.cz/web
ServerName domain1.cz
ServerAlias www.domain1.cz
ServerAdmin webmaster@domain1.cz
ErrorLog /var/log/ispconfig/httpd/domain1.cz/error.log
Alias /error/ "/var/www/domain1.cz/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateFile /var/www/clients/client3/web82/ssl/domain1.cz.crt
SSLCertificateKeyFile /var/www/clients/client3/web82/ssl/domain1.cz.key
</IfModule>
<Directory /var/www/domain1.cz/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client3/web82/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain1.cz"
php_admin_value upload_tmp_dir /var/www/clients/client3/web82/tmp
php_admin_value session.save_path /var/www/clients/client3/web82/tmp
# PHPIniDir /var/www/conf/web82
php_admin_value open_basedir /var/www/clients/client3/web82/web:/var/www/clients/client3/web82/tmp:/var/www/domain1.cz/web:/srv/www/domain1.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyad$
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web82 client3
</IfModule>
<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client3/web82/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client3/web82/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
</VirtualHost>
Domain2
Code:
<Directory /var/www/domain2.cz>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>
<VirtualHost *:80>
DocumentRoot /var/www/domain2.cz/web
ServerName domain2.cz
ServerAlias www.domain2.cz
ServerAlias webmail.domain2.cz
ServerAlias www.aliasfordomain.cz aliasfordomain.cz
ServerAlias posta.domain2.cz
ServerAlias phpmyadmin.domain2.cz
ServerAlias mysql.domain2.cz
ServerAlias admin.domain2.cz
ServerAdmin webmaster@domain2.cz
ErrorLog /var/log/ispconfig/httpd/domain2.cz/error.log
Alias /error/ "/var/www/domain2.cz/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
<IfModule mod_ssl.c>
</IfModule>
<Directory /var/www/domain2.cz/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client2/web2/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain2.cz"
php_admin_value upload_tmp_dir /var/www/clients/client2/web2/tmp
php_admin_value session.save_path /var/www/clients/client2/web2/tmp
# PHPIniDir /var/www/conf/web2
# PHPIniDir /var/www/conf/web2
php_admin_value open_basedir /var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/domain2.cz/web:/srv/www/domain2.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
RewriteEngine on
RewriteCond %{HTTP_HOST} ^aliasfordomain.cz$ [NC]
RewriteRule ^/(.*)$ http://domain2.cz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.aliasfordomain.cz$ [NC]
RewriteRule ^/(.*)$ http://domain2.cz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^posta.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://mail.domain2.cz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^phpmyadmin.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^mysql.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^admin.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://emc2.domain2.cz:8080/$1 [R=301,L]
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web2 client2
</IfModule>
<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client2/web2/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client2/web2/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
</VirtualHost>
<VirtualHost *:443>
DocumentRoot /var/www/domain2.cz/web
ServerName domain2.cz
ServerAlias www.domain2.cz
ServerAlias webmail.domain2.cz
ServerAlias www.aliasfordomain.cz aliasfordomain.cz
ServerAlias posta.domain2.cz
ServerAlias phpmyadmin.domain2.cz
ServerAlias mysql.domain2.cz
ServerAlias admin.domain2.cz
ServerAdmin webmaster@domain2.cz
ErrorLog /var/log/ispconfig/httpd/domain2.cz/error.log
Alias /error/ "/var/www/domain2.cz/web/error/"
ErrorDocument 400 /error/400.html
ErrorDocument 401 /error/401.html
ErrorDocument 403 /error/403.html
ErrorDocument 404 /error/404.html
ErrorDocument 405 /error/405.html
ErrorDocument 500 /error/500.html
ErrorDocument 502 /error/502.html
ErrorDocument 503 /error/503.html
<IfModule mod_ssl.c>
SSLEngine on
SSLCertificateFile /var/www/clients/client2/web2/ssl/domain2.cz.crt
SSLCertificateKeyFile /var/www/clients/client2/web2/ssl/domain2.cz.key
</IfModule>
<Directory /var/www/domain2.cz/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/clients/client2/web2/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
# Clear PHP settings of this website
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
# mod_php enabled
AddType application/x-httpd-php .php .php3 .php4 .php5
php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@domain2.cz"
php_admin_value upload_tmp_dir /var/www/clients/client2/web2/tmp
php_admin_value session.save_path /var/www/clients/client2/web2/tmp
# PHPIniDir /var/www/conf/web2
php_admin_value open_basedir /var/www/clients/client2/web2/web:/var/www/clients/client2/web2/tmp:/var/www/domain2.cz/web:/srv/www/domain2.cz/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin
RewriteEngine on
RewriteCond %{HTTP_HOST} ^aliasfordomain.cz$ [NC]
RewriteRule ^/(.*)$ http://domain2.cz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^www.aliasfordomain.cz$ [NC]
RewriteRule ^/(.*)$ http://domain2.cz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^posta.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://mail.domain2.cz/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^phpmyadmin.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^mysql.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://einstein.domain2.cz:8080/phpmyadmin/$1 [R=301,L]
RewriteCond %{HTTP_HOST} ^admin.domain2.cz$ [NC]
RewriteRule ^/(.*)$ http://emc2.domain2.cz:8080/$1 [R=301,L]
# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web2 client2
</IfModule>
<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client2/web2/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client2/web2/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
</VirtualHost>
|

22nd May 2012, 14:30
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
Can you assign a fixed IP to both vhosts instead of *?
|

22nd May 2012, 14:40
|
|
Member
|
|
Join Date: Aug 2008
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Could be the same IP address?
In ispconfig - have I checked "HTTP NameVirtualHost" option with adding IP address?
Will be working if I add IP to ispconfig and assign to these two vhosts - other vhosts with "*" option (using the same IP address)?
|

23rd May 2012, 14:32
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
Quote:
Originally Posted by czdavid
Could be the same IP address?
|
If you want to use SNI, then yes.
Quote:
Originally Posted by czdavid
In ispconfig - have I checked "HTTP NameVirtualHost" option with adding IP address?
|
That's correct.
Quote:
Originally Posted by czdavid
Will be working if I add IP to ispconfig and assign to these two vhosts - other vhosts with "*" option (using the same IP address)?
|
Yes.
|

23rd May 2012, 16:49
|
|
Member
|
|
Join Date: Aug 2008
Posts: 37
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Thank you very much.
I discovered this in log:
Code:
[Mon May 21 23:07:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:14:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:14:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:46:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:46:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:47:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:47:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:05 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:06 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:08 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:09 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:03 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:05 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:06 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:13:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:13:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:15:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:15:03 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
Do you think, that add IP address help?
And three easy more questions for you (hope last):
1) In log:
Code:
May 24 04:31:44 server postfix/smtpd[20857]: warning: 127.0.0.1: address not listed for hostname localhost.localdomain
May 24 04:32:02 server postfix/smtpd[20857]: warning: 127.0.0.1: address not listed for hostname localhost.localdomain
I have in /etc/hosts (IP is changed and real is working  )
Code:
::1 localhost.localdomain localhost
127.0.0.1 localhost.localdomain localhost
# Auto-generated hostname. Please do not remove this comment.
256.256.256.256 server.mydomain.cz server
2) That is date which is showing server after DATE command:
Thu May 24 10:00:33 CEST 2012
- that is ok, but ispconfig is whowing time TWO hours less than is on server time - is in ispconfig possible set timezone?
3) CRON error report:
Code:
/etc/cron.daily/pve:
parse error in '/etc/pve/datacenter.cfg' - 'keyboard': value 'en' does not have a value in the enumeration 'pt, tr, ja, es, no, is, fr-ca, fr, pt-br, da, fr-ch, sl, de-ch, en-gb, it, en-us, fr-be, hu, pl, nl, mk, fi, lt, sv, de'
I cant find file /etc/pve/datacenter.cfg for edit value keyboard - where I cant find it?
Thank you!!!
Last edited by czdavid; 24th May 2012 at 10:06.
|

24th May 2012, 13:42
|
|
Super Moderator
|
|
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,685
Thanks: 1,899
Thanked 2,602 Times in 2,451 Posts
|
|
Quote:
Originally Posted by czdavid
Thank you very much.
I discovered this in log:
Code:
[Mon May 21 23:07:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:14:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:14:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:46:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:46:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:47:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Mon May 21 23:47:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:05 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:06 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:08 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:54:09 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:03 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:05 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 11:55:06 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:13:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:13:02 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:15:01 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
[Tue May 22 12:15:03 2012] [warn] _default_ VirtualHost overlap on port 443, the first has precedence
Do you think, that add IP address help?
|
Yes, please try it.
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +2. The time now is 14:49.
|
|
Recent comments
8 hours 39 min ago
13 hours 31 min ago
22 hours 23 min ago
23 hours 23 min ago
1 day 3 hours ago
1 day 4 hours ago
1 day 8 hours ago
1 day 15 hours ago
2 days 9 min ago
2 days 1 hour ago