HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   New IP (and cert) to old site brings "welcome"-page (http://www.howtoforge.com/forums/showthread.php?t=61183)

linus 28th March 2013 08:48

New IP (and cert) to old site brings "welcome"-page
 
Using Ispconfig version 3.0.4.6 with Centos. I have stumbled into a problematic case:
A site needed SSL, so I ordered the certificate (rapid ssl) using the CSR in the site's panel. I assigned an IP ...250 (unused) instead of the "*" and inserted the certificate and bundle.

Suddenly the site showed the "welcome"-page instead of the real deal. I changed the ip back to "*" instead of the new ip.

Every time I selected the ip ....250 the site shows the wrong page, and luckily it helps selecting the "*" back.

I tried to select another ip ...249 and then the site worked until I entered the certificate. After that the "welcome" page appeared instead.

The https:// just reports self signed certificate instead of the installed one.

I have checked the ssl-box and read the instructions, but am I doing something wrong? An earlier installed certificate is working for another site and ip on the system.



... And as always, thank you developers for the exceptional ISPconfig, it has been good to me during 6 or so years of use.

linus 1st April 2013 16:53

Any advice on where to start?
 
What information do you need to help me out on this?

linus 3rd April 2013 05:43

The conf files
 
I looked at the working conf file ( /etc/httpd/conf/sites-available/www.customer.com.vhost ) and compared it to the non working (that with the defined IP) and noticed only differences was the *:80 and *:443 replaced to the ip 192.168.10.250:80 resp. 192.168.10.250:443.

When the ip is defined now surfing to the page only shows blank page and surfing to https-version shows the /var/www/html/index.html document.

I have enabled debugging in the ispconfig-interface but under server log I found no updates. I have no idea why the page disappears when assigned to an IP.

This is the asterix (*)-version (domain replaced with customer.com):

<Directory /var/www/www.customer.com>
AllowOverride None
Order Deny,Allow
Deny from all
</Directory>

<VirtualHost *:80>
DocumentRoot /var/www/www.customer.com/web

ServerName www.customer.com
ServerAlias customer.com
ServerAlias www.aliascustomer.com
ServerAdmin webmaster@www.customer.com

ErrorLog /var/log/ispconfig/httpd/www.customer.com/error.log

Alias /error/ "/var/www/www.customer.com/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/www.customer.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client3/web25/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>

# cgi enabled
<Directory /var/www/clients/client3/web25/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client3/web25/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# 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@www.customer.com"
php_admin_value upload_tmp_dir /var/www/clients/client3/web25/tmp
php_admin_value session.save_path /var/www/clients/client3/web25/tmp
# PHPIniDir /var/www/conf/web25

RewriteEngine on
RewriteCond %{HTTP_HOST} ^customer.com$ [NC]
RewriteCond %{REQUEST_URI} !^/webdav/
RewriteRule ^/(.*)$ http://www.customer.com/$1 [R,L]
RewriteCond %{HTTP_HOST} ^www.aliascustomer.com$ [NC]
RewriteCond %{REQUEST_URI} !^/webdav/
RewriteRule ^/(.*)$ http://www.customer.com/$1 [R,L]

# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web25 client3
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client3/web25/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client3/web25/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/www.customer.com/web

ServerName www.customer.com
ServerAlias customer.com
ServerAlias www.aliascustomer.com
ServerAdmin webmaster@www.customer.com

ErrorLog /var/log/ispconfig/httpd/www.customer.com/error.log

Alias /error/ "/var/www/www.customer.com/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/web25/ssl/www.customer.com.crt
SSLCertificateKeyFile /var/www/clients/client3/web25/ssl/www.customer.com.key
SSLCACertificateFile /var/www/clients/client3/web25/ssl/www.customer.com.bundle
</IfModule>

<Directory /var/www/www.customer.com/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
<Directory /var/www/clients/client3/web25/web>
Options FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all

# ssi enabled
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Options +Includes
</Directory>
# cgi enabled
<Directory /var/www/clients/client3/web25/cgi-bin>
Order allow,deny
Allow from all
</Directory>
ScriptAlias /cgi-bin/ /var/www/clients/client3/web25/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
# 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@www.customer.com"
php_admin_value upload_tmp_dir /var/www/clients/client3/web25/tmp
php_admin_value session.save_path /var/www/clients/client3/web25/tmp
# PHPIniDir /var/www/conf/web25

RewriteEngine on
RewriteCond %{HTTP_HOST} ^customer.com$ [NC]
RewriteCond %{REQUEST_URI} !^/webdav/
RewriteRule ^/(.*)$ http://www.customer.com/$1 [R,L]
RewriteCond %{HTTP_HOST} ^www.hiihtokeskuscustomer.com$ [NC]
RewriteCond %{REQUEST_URI} !^/webdav/
RewriteRule ^/(.*)$ http://www.customer.com/$1 [R,L]

# add support for apache mpm_itk
<IfModule mpm_itk_module>
AssignUserId web25 client3
</IfModule>

<IfModule mod_dav_fs.c>
# Do not execute PHP files in webdav directory
<Directory /var/www/clients/client3/web25/webdav>
<FilesMatch "\.ph(p3?|tml)$">
SetHandler None
</FilesMatch>
</Directory>
DavLockDB /var/www/clients/client3/web25/tmp/DavLock
# DO NOT REMOVE THE COMMENTS!
# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
# WEBDAV BEGIN
# WEBDAV END
</IfModule>
</VirtualHost>


All times are GMT +2. The time now is 10:36.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.