PDA

View Full Version : 2 domains, 1 site


wadims
26th May 2006, 16:19
I have one problem:

I have 2 different sites on my computer, in two folders :
1) www.domain1.com/
2) www.domain2.com

But in my www folder there iz another site, and when somebody goes to www.domain1.com , browser shows the site which is in the www folder! Is it possible to not to move the site in www folder, but to get to work www.domain1.com and www.domain2.com?

Thanks!

falko
26th May 2006, 16:50
What's in your Vhosts_ispconfig.conf?

wadims
27th May 2006, 01:20
What's in your Vhosts_ispconfig.conf?

###################################
#
# ISPConfig vHost Configuration File
# Version 1.0
#
###################################
#
NameVirtualHost 81.198.181.5:80
<VirtualHost 81.198.181.5:80>
ServerName localhost
ServerAdmin root@localhost
DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.erisinajumi.lv:80
######################################
#
#
<VirtualHost 81.198.181.5:80>
ServerName www.erisinajumi.lv:80
ServerAdmin webmaster@erisinajumi.lv
DocumentRoot /var/www/web11/web
ServerAlias erisinajumi.lv www.erisinajumi.lv
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web11/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web11/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web11/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web11/phptmp/
php_admin_value session.save_path /var/www/web11/phptmp/
Alias /error/ "/var/www/web11/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web11/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web11/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.reklamasbirojs.lv:80
######################################
#
#
<VirtualHost 81.198.181.5:80>
ServerName www.reklamasbirojs.lv:80
ServerAdmin webmaster@reklamasbirojs.lv
DocumentRoot /var/www/web16/web
ServerAlias reklamasbirojs.lv
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web16/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web16/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web16/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web16/phptmp/
php_admin_value session.save_path /var/www/web16/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web16/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web16/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web16/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.redzescentrs.lv:80
######################################
#
#
<VirtualHost 81.198.181.5:80>
ServerName www.redzescentrs.lv:80
ServerAdmin webmaster@redzescentrs.lv
DocumentRoot /var/www/web17/web
ServerAlias redzescentrs.lv
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web17/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web17/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web17/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web17/phptmp/
php_admin_value session.save_path /var/www/web17/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web17/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web17/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web17/user/$1/web/$3
</VirtualHost>
#
#
#
######################################
# Vhost: www.ipprojekts.lv:80
######################################
#
#
<VirtualHost 81.198.181.5:80>
ServerName www.ipprojekts.lv:80
ServerAdmin webmaster@ipprojekts.lv
DocumentRoot /var/www/web21/web
ServerAlias ipprojekts.lv
DirectoryIndex index.html index.htm index.php index.php5 index.php4 index.php3 index.shtml index.cgi index.pl index.jsp Default.htm default.htm
ScriptAlias /cgi-bin/ /var/www/web21/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web21/log/error.log
AddType application/x-httpd-php .php .php3 .php4 .php5
<Files *.php>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php3>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php4>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
<Files *.php5>
SetOutputFilter PHP
SetInputFilter PHP
</Files>
php_admin_flag safe_mode On
php_admin_value open_basedir /var/www/web21/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web21/phptmp/
php_admin_value session.save_path /var/www/web21/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/var/www/web21/web/error/"
ErrorDocument 400 /error/invalidSyntax.html
ErrorDocument 401 /error/authorizationRequired.html
ErrorDocument 403 /error/forbidden.html
ErrorDocument 404 /error/fileNotFound.html
ErrorDocument 405 /error/methodNotAllowed.html
ErrorDocument 500 /error/internalServerError.html
ErrorDocument 503 /error/overloaded.html
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web21/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web21/user/$1/web/$3
</VirtualHost>
#
#
#

falko
27th May 2006, 14:56
Which distribution do you use?
Is 81.198.181.5 your public IP address?
What's the output of ls -la /var/www?

wadims
29th May 2006, 15:15
I use Ubuntu / ISPConfig
Version: 2.2.1
(c) ISPConfig 2006
--

Yes, 81.198.181.5 is my public IP, but I have router in front of it! And I configured it so... ir recives packets from 80 port, and sends them to my server!

Output:


root@server1:/home/vadims# ls -la /var/www
total 260
drwxrwxrwx 24 root root 4096 2006-05-25 22:41 .
drwxr-xr-x 16 root root 4096 2006-05-12 21:54 ..
drwxrwxrwx 9 vadims vadims 4096 2006-04-30 21:51 administrator
drwxrwxrwx 2 root root 4096 2006-04-25 06:35 apache2-default
drwxrwxrwx 2 vadims vadims 4096 2006-02-26 06:38 cache
-rwxrwxrwx 1 vadims vadims 56216 2006-02-26 06:37 CHANGELOG.php
drwxrwxrwx 20 vadims vadims 4096 2006-05-03 03:05 components
-rwxrwxrwx 1 vadims vadims 2430 2006-05-04 19:24
configuration.ph p
-rwxrwxrwx 1 vadims vadims 2437 2006-05-04 19:08
configuration.ph p~
-rwxrwxrwx 1 vadims vadims 4198 2006-05-03 03:16
configuration.ph p-dist
-rwxrwxrwx 1 vadims vadims 3429 2006-02-26 06:37 COPYRIGHT.php
drwxrwxrwx 2 vadims vadims 4096 2006-02-26 06:38 editor
drwxrwxrwx 2 vadims vadims 4096 2006-05-03 00:10 error
-rwxrwxrwx 1 vadims vadims 3053 2006-02-26 06:37 globals.php
drwxrwxrwx 3 vadims vadims 4096 2006-02-26 06:38 help
-rwxrwxrwx 1 vadims vadims 3584 2006-02-26 06:37 .htaccess
drwxrwxrwx 6 vadims vadims 4096 2006-05-06 13:44 images
drwxrwxrwx 10 vadims vadims 4096 2006-02-26 06:38 includes
-rwxrwxrwx 1 vadims vadims 4574 2006-02-26 06:37 index2.php
-rwxrwxrwx 1 vadims vadims 6842 2006-02-26 06:37 index.php
-rwxrwxrwx 1 vadims vadims 71 2006-05-01 19:42 index.php~
drwxrwxrwx 3 vadims vadims 4096 2006-02-26 06:38 installation.old
-rwxrwxrwx 1 vadims vadims 4374 2006-02-26 06:37 INSTALL.php
drwxrwxrwx 2 vadims vadims 4096 2006-05-03 03:39 language
-rwxrwxrwx 1 vadims vadims 17977 2006-02-26 06:38 LICENSE.php
drwxrwxrwx 5 www-data www-data 4096 2006-05-02 23:48 Maildir
-rwxrwxrwx 1 vadims vadims 710 2006-02-26 06:38 mainbody.php
drwxrwxrwx 7 vadims vadims 4096 2006-02-26 06:38 mambots
drwxrwxrwx 2 vadims vadims 4096 2006-05-03 03:08 media
drwxrwxrwx 2 vadims vadims 4096 2006-05-02 21:19 modules
-rwxrwxrwx 1 vadims vadims 2474 2006-02-26 06:38 offlinebar.php
-rwxrwxrwx 1 vadims vadims 3777 2006-02-26 06:38 offline.php
-rwxrwxrwx 1 vadims vadims 709 2006-02-26 06:38 pathway.php
lrwxrwxrwx 1 root root 21 2006-05-13 19:56
phpmyadmin -> /u sr/share/phpmyadmin
-rwxrwxrwx 1 vadims vadims 20 2006-04-30 22:20 php.php
-rwxrwxrwx 1 vadims vadims 286 2006-02-26 06:38 robots.txt
drwxrwxrwx 2 root root 4096 2006-05-02 22:28 sharedip
drwxrwxrwx 6 vadims vadims 4096 2006-05-01 00:01 templates
-rwxrwxrwx 1 vadims vadims 61 2006-05-03 02:39 test.php
drwxrwxrwx 9 mihails web11 4096 2006-05-26 19:03 web11
drwxrwxrwx 8 reklamasbirojslv web16 4096 2006-05-26 19:03 web16
drwxrwxrwx 8 www-data web17 4096 2006-05-08 00:11 web17
drwxrwxrwx 8 www-data web21 4096 2006-05-25 22:41 web21
drwxrwxrwx 2 root root 4096 2006-04-25 06:43 webalizer
lrwxrwxrwx 1 www-data web11 14 2006-04-30 18:21
www.erisinajumi. lv -> /var/www/web11
lrwxrwxrwx 1 www-data web21 14 2006-05-25 22:41
www.ipprojekts.l v -> /var/www/web21
lrwxrwxrwx 1 www-data web17 14 2006-05-08 00:11
www.redzescentrs .lv -> /var/www/web17
lrwxrwxrwx 1 www-data web16 14 2006-05-07 19:05
www.reklamasbiro js.lv -> /var/www/web16
root@server1:/home/vadims#

falko
29th May 2006, 16:35
I use Ubuntu / ISPConfig
Version: 2.2.1
(c) ISPConfig 2006
--

Yes, 81.198.181.5 is my public IP, but I have router in front of it! And I configured it so... ir recives packets from 80 port, and sends them to my server!


Then you installed ISPConfig with the wrong IP address! You should have used your server's internel IP address, not your router's public one.

wadims
29th May 2006, 19:22
Then you installed ISPConfig with the wrong IP address! You should have used your server's internel IP address, not your router's public one.

Is it possible to change it without reinstalling???

till
29th May 2006, 20:05
Is it possible to change it without reinstalling???

Yes, in ISPConfig under management > server Settings. Dont forget to change the IP in the websites too and save them.

wadims
29th May 2006, 20:33
Yes, in ISPConfig under management > server Settings. Dont forget to change the IP in the websites too and save them.


Same problem :(

till
29th May 2006, 20:35
Same problem :(

Have you changed the IP in every website and hit save?

wadims
29th May 2006, 21:29
Have you changed the IP in every website and hit save?

Now I have:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@erisinajumi.lv and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

falko
30th May 2006, 01:29
Is it possible to change it without reinstalling???
http://www.howtoforge.com/forums/showthread.php?t=2760

wadims
30th May 2006, 18:24
I am still having 500 error :(

AND whats interesting that...
www.domain.com shows 500 error, BUT
www.domain.com:81 shows ISPConfig admin panel! Can anybody PLEASE help?

falko
31st May 2006, 01:21
AND whats interesting that...
www.domain.com shows 500 error, BUT
www.domain.com:81 shows ISPConfig admin panel! Can anybody PLEASE help?
ISPConfig has its own Apache which is totally independent from your main Aapche.
Anything in your Apache's error log?
Can you post the URL here where you get the 500 error?