Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th December 2006, 17:07
bss bss is offline
Junior Member
 
Join Date: Dec 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache virtual hosts!?!

HI!
My problem is:
I have a domain called oblika.si and
when I enter the this address (http://oblika.si or http://www.oblika.si) ito the browser I get my apache server default document root(/) insted of (/web11/web/). When I enter the IP address into my browser it doesn't point to shared ip page but to default server root... so I had an a problem becouse I have configured my apache settings (in isp config) wrong - apache2.conf insted of httpd.conf.

So I installed webmin on my server and looked to my apache virtual hosts configuration.

my /etc/apache2/vhosts/Vhosts_ispconfig.conf look like that:
Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 84.255.204.201:80
<VirtualHost 84.255.204.201:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.oblika.si:80
######################################
#
#
<VirtualHost 84.255.204.201:80>
ServerName www.oblika.si:80
ServerAdmin webmaster@oblika.si
DocumentRoot /var/www/web11/web
ServerAlias oblika.si webmail.oblika.si
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/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
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>
#
#
#
But i think this is one of the problem causing things:
Code:
<VirtualHost 84.255.204.201:80>
And I tried to change this line to <VirtualHost _default_:80>
and then it worked...but...ISP config configs this as <VirtualHost 84.255.204.201:80>
and if there is a solution to config this in ISPconfig becouse in need perfect setup for multi domain hosting and i dont want to change every apache virtual host by hand....and i think tha ISPconfig creates IP based virtual hosts in apache insted of name based virtual hosts!!!

Thank you for all in advance!

P.S.:
My DNS settings are OK.

Last edited by bss; 12th December 2006 at 17:38.
Reply With Quote
Sponsored Links
  #2  
Old 13th December 2006, 11:01
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,380
Thanks: 833
Thanked 5,480 Times in 4,314 Posts
Default

Is your server behind a router? Then you must select the internal IP address, not the external. By the way, never edit Vhosts_ispconfig.conf manually, it is not nescessary and it wont work for long.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 13th December 2006, 15:05
bss bss is offline
Junior Member
 
Join Date: Dec 2006
Posts: 23
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes... i am behind an IP cop firewall and figure it out that ISP creats IP based virtual host insted of name based...thanks again
But then I need to manualy edit the DNS settings to my external IP

Last edited by bss; 13th December 2006 at 17:36.
Reply With Quote
  #4  
Old 13th December 2006, 21:40
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,380
Thanks: 833
Thanked 5,480 Times in 4,314 Posts
Default

ISPConfig creates only namebased virtual hosts, not IP based. When you are behind a roter, you will have to set the external IP for the DNS records manually.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 17th December 2006, 15:40
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

I am in the process of moving many domains from one IP to another on the same server.

It would be very much easier for me if I could have :

######################################
# Vhost: {SERVERNAME}
######################################
#
#
<VirtualHost {SERVERNAME}>

instead of :

######################################
# Vhost: {SERVERNAME}
######################################
#
#
<VirtualHost {IP}>

in vhost.conf.master

Would that cause any problems somewhere else?
Reply With Quote
  #6  
Old 18th December 2006, 08:30
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,380
Thanks: 833
Thanked 5,480 Times in 4,314 Posts
Default

You will have to change the ISPConfig code and it might work, but I've not tested that.

There is a easier way to change the IP of a lot of websites. Change the IP in the ISPConfig database in the table isp_isp_web and set the value of the field staus = 'u', then update and safe one website in the interface and all websites will be changed.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 18th December 2006, 12:13
hairydog2 hairydog2 is offline
Senior Member
 
Join Date: Oct 2005
Posts: 196
Thanks: 9
Thanked 3 Times in 2 Posts
Default

That sounds like a better bet for the number I have to change. Thank you.

Would that also change the DNS, or would I have to do that separately?

The reason I wanted to use names for the web server is that whatever you do, changing the web server IP and the IP in the DNS will mean that some people will go to the "wrong" IP and not get through, depending on how long the DNS change takes to spread out.
Reply With Quote
  #8  
Old 18th December 2006, 12:42
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 36,380
Thanks: 833
Thanked 5,480 Times in 4,314 Posts
 
Default

You will have to change the DNS separately. Change the IP addresses in the database tables dns_a and dns_isp_dns. then set the field status = 'u' in the table dns_isp_dns for all records that shall be updated. Then update one DNS record in the interface and all records with status = 'u' will be updated.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
No Virtual Hosts tac Installation/Configuration 5 5th August 2006 16:02
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45
Apache - Virtual hosts - ISPConfig Hans Server Operation 8 23rd April 2006 16:29
apache and virtual hosts stored in postgresql variable Server Operation 3 28th December 2005 11:48


All times are GMT +2. The time now is 15:43.


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