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 13th June 2006, 22:36
KishCom KishCom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Apache Config with ISPConfig

I'm pretty new to this ISPConfig, but I've got it up and running on Fedora Core 4, and I''ve got a test site entered in with a user setup and everything. I can't seem to access the site though.
I've tried:
http://mysite.com/users/web1_username/index.html
http://mysite.com/~web1_username/index.html
http://mysites_ip/users/web1_username/index.html
http://mysites_ip/~web1_username/index.html

And they all give me 404's.
if I visit just http://mysite.com I get the Apache Test Page - is that supposed to happen?
When I restart the httpd process I get this warning which I know has something to do with the problem, I just don't know how to fix it:
Code:
Starting httpd: [Tue Jun 13 15:43:06 2006] [warn] NameVirtualHost 70.54.180.143:80 has no VirtualHosts
How do I configure my site's preview?

Last edited by KishCom; 13th June 2006 at 22:45.
Reply With Quote
Sponsored Links
  #2  
Old 14th June 2006, 00:03
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

Quote:
Originally Posted by KishCom
if I visit just http://mysite.com I get the Apache Test Page - is that supposed to happen?
No, that's not ok.
What's the output of
Code:
ifconfig
?
What's in Vhosts_ispconfig.conf?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 14th June 2006, 17:58
KishCom KishCom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

ifconfig (omitted the loop back)
Code:
eth0      Link encap:Ethernet  HWaddr 00:0A:E6:A4:30:C1
          inet addr:192.168.128.106  Bcast:192.168.128.255  Mask:255.255.255.0
          inet6 addr: fe80::20a:e6ff:fea4:30c1/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:43329 errors:0 dropped:0 overruns:0 frame:0
          TX packets:45267 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:14377734 (13.7 MiB)  TX bytes:17140478 (16.3 MiB)
          Interrupt:5 Base address:0xdc00
and my Vhosts_ispconfig.conf - I don't know too too much about apache config files, but I'm pretty sure that NameVirtualHost is duplicated (which is why it's outputing that error). I tried taking out the second one, it does remove the warning, but does nothing for my original problem. (ip address hidden with x's ... there's actual numbers there IRL)
Code:
###################################
#
# ISPConfig vHost Configuration File
#         Version 1.0
#
###################################
#
NameVirtualHost 70.x.x.x:80
<VirtualHost 70.x.x.x:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
NameVirtualHost 70.x.x.x:80
<VirtualHost 70.x.x.x:80>
  ServerName localhost
  ServerAdmin root@localhost
  DocumentRoot /var/www/sharedip
</VirtualHost>
#
#
#
######################################
# Vhost: www.mysite.com:80
######################################
#
#
<VirtualHost 70.x.x.x:80>
ServerName www.mysite.com:80
ServerAdmin webmaster@mysite.com
DocumentRoot /home/www/web1/web
ServerAlias 2hotnsexy.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/ /home/www/web1/cgi-bin/
AddHandler cgi-script .cgi
AddHandler cgi-script .pl
ErrorLog /home/www/web1/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 /home/www/web1/
php_admin_value file_uploads 1
php_admin_value upload_tmp_dir /home/www/web1/phptmp/
php_admin_value session.save_path /home/www/web1/phptmp/
AddType text/html .shtml
AddOutputFilter INCLUDES .shtml
Alias /error/ "/home/www/web1/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 ^/~([^/]+)(/(.*))? /home/www/web1/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web1/user/$1/web/$3
</VirtualHost>
#
#
Reply With Quote
  #4  
Old 14th June 2006, 18:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
Default

You're using the wrong IP address in ISPConfig! You must use 192.168.128.106 instead of 70.x.x.x.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 14th June 2006, 19:03
KishCom KishCom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That solves one problem. I now get the proper 'shared ip' page.
However it seems Apache is still ignoring my ispconfig vhosts file.

When I visit http://70.x.x.x/~web3_admin
It gives me a 404 and I check the apache error logs I see:
[Wed Jun 14 11:59:18 2006] [error] [client 192.168.128.1] File does not exist: /var/www/sharedip/~web3_admin
Reply With Quote
  #6  
Old 15th June 2006, 15:09
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

Quote:
Originally Posted by KishCom
That solves one problem. I now get the proper 'shared ip' page.
However it seems Apache is still ignoring my ispconfig vhosts file.

When I visit http://70.x.x.x/~web3_admin
It gives me a 404 and I check the apache error logs I see:
[Wed Jun 14 11:59:18 2006] [error] [client 192.168.128.1] File does not exist: /var/www/sharedip/~web3_admin
You can never use your IP address to connect to a website cretaed in ISPConfig. ISPConfig uses nambased vhosts. Use the domain instaed of the IP address!
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 15th June 2006, 17:01
KishCom KishCom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Am I misunderstanding the purpose of these lines in the vhosts file?
Code:
AliasMatch ^/~([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
I'd very much like to preview sites before I switch nameservers over - rather than switching them over risk having compatibility issues when migrating.
Even for showing new customers before their domain has propagated.
Reply With Quote
  #8  
Old 15th June 2006, 17:05
till till is online now
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,446
Thanks: 813
Thanked 5,213 Times in 4,088 Posts
Default

Quote:
Originally Posted by KishCom
Am I misunderstanding the purpose of these lines in the vhosts file?
Code:
AliasMatch ^/~([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/www/web3/user/$1/web/$3
These lines are for the user website feature. See user manual (client) chapter 2.2.9

Quote:
I'd very much like to preview sites before I switch nameservers over - rather than switching them over risk having compatibility issues when migrating.
Even for showing new customers before their domain has propagated.
Then you have to add the domain with the correct IP to the hosts file on your workstation, thats possible on windows and linux.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #9  
Old 15th June 2006, 21:44
KishCom KishCom is offline
Junior Member
 
Join Date: Jun 2006
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till
Then you have to add the domain with the correct IP to the hosts file on your workstation, thats possible on windows and linux.
That's a lot of work for clients to do.
I've used some trickery in the httpd.conf and in the .htaccess of the sharedip folder to accomplish what I wanted.
Does ISPConfig ever rewrite the httpd.conf file? If so where can I find the script that does it?
Reply With Quote
  #10  
Old 16th June 2006, 02:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,722 Times in 2,563 Posts
 
Default

Quote:
Originally Posted by KishCom
Does ISPConfig ever rewrite the httpd.conf file?
It rewrites the Vhosts_ispconfig.conf. But you can use your own directives using the Apache Directives field in ISPConfig.


Quote:
Originally Posted by KishCom
If so where can I find the script that does it?
Have a look at the function make_vhost() in /root/ispconfig/scripts/lib/config.lib.php.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
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
Can you load balance all ISPConfig Services, including Apache? Jcorrea920 General 6 9th June 2006 23:07
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
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 10:48


All times are GMT +2. The time now is 19:11.


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