#1  
Old 13th June 2007, 18:33
stirfry stirfry is offline
Member
 
Join Date: Jun 2007
Posts: 37
Thanks: 4
Thanked 0 Times in 0 Posts
Default Virtual Hosting Not Working

I have created a site in ISPConfig but the site resolves to the web root rather than the document root specified in the "Vhosts_ispconfig.conf" file as shown here:

Code:
NameVirtualHost 000.00.000.0:80
<VirtualHost 000.00.000.0:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.mysite.com:80
######################################
#
#
<VirtualHost 000.00.000.0:80>
ServerName www.mysite.com:80
ServerAdmin webmaster@mysite.com
DocumentRoot /var/www/web6/web
ServerAlias mysite.com
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
##### [shortened to save space]##########
AliasMatch ^/~([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
</VirtualHost>
So, basically, I can see the directory ISPConfig created for my site when I got to http://www.mysite.com. What am I doing wrong? Any help is appreciated!
Reply With Quote
Sponsored Links
  #2  
Old 13th June 2007, 19:24
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,493
Thanks: 835
Thanked 5,534 Times in 4,352 Posts
Default

You must select the correct IP address for the website. If your server is behind a router, you must use the internal IP address.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 13th June 2007, 19:46
stirfry stirfry is offline
Member
 
Join Date: Jun 2007
Posts: 37
Thanks: 4
Thanked 0 Times in 0 Posts
Default

I actually had specified the IP, but just used zeros for the IP and "mysite.com" to make it generic for my forum post. Probably a bad idea. Here's my actual vHost Config File:

Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 209.40.194.6:80
<VirtualHost 209.40.194.6:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
######################################
# Vhost: www.aylingreen.com:80
######################################
#
#
<VirtualHost 209.40.194.6:80>
ServerName www.aylingreen.com:80
ServerAdmin webmaster@aylingreen.com
DocumentRoot /var/www/web6/web
ServerAlias aylingreen.com work.aylingreen.com
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/web6/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /var/www/web6/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/web6/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /var/www/web6/phptmp/
php_admin_value session.save_path /var/www/web6/phptmp/
Alias /error/ "/var/www/web6/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/web6/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /var/www/web6/user/$1/web/$3
</VirtualHost>
Reply With Quote
  #4  
Old 13th June 2007, 19:58
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,493
Thanks: 835
Thanked 5,534 Times in 4,352 Posts
Default

And this server is not behind a router?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 13th June 2007, 21:05
stirfry stirfry is offline
Member
 
Join Date: Jun 2007
Posts: 37
Thanks: 4
Thanked 0 Times in 0 Posts
Default

That's the public IP I was given by my Virtual Private Server hosting service. I'm not sure how they have their network set up.
Reply With Quote
  #6  
Old 14th June 2007, 03:17
stirfry stirfry is offline
Member
 
Join Date: Jun 2007
Posts: 37
Thanks: 4
Thanked 0 Times in 0 Posts
Default

So, yes, I imagine it is behind a router. Is there a way to know for sure without having to ask my hosting service?
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
Virtual Hosting: How do I set this up? VinceDee Installation/Configuration 7 12th December 2006 19:36
Building a virtual hosting structure thim Suggest HOWTO 16 25th June 2006 14:40
Virtual Hosting With Proftpd And MySQL (Incl. Quota) Secure? ToysunStory HOWTO-Related Questions 1 9th May 2006 01:03
Virtual hosting with Apache not working gimhan90 Server Operation 10 10th February 2006 16:11
postfix config jmroth Installation/Configuration 6 18th September 2005 16:58


All times are GMT +2. The time now is 14:18.


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