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

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 4th July 2009, 19:35
ChristianFe ChristianFe is offline
Junior Member
 
Join Date: Apr 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default Question on Apache behaviour

Hi guys,

sorry to bother you with questions again, but for once I've got the intention of getting my server to work exactly as I want it, not just "working but not nice" and on the way I only want to do thinks that I feel I understand.
As such a few questions:

(I've installed ISPConfig 3, following the Perfect Server Howto, onto a fresh Debian Lenny.)

I have currently got 2 domains set up on the server. I've set www.* aliases and these two domains work flawlessly.

I've also setup a webmail.domain1.tld site and symlinked the squirrelmail install into this. I created a webmail.domain2.tld alias for this and I intend to somehow automate this for future sites added, but that's not a priority at the moment.

www.domain1.tld --> works
domain1.tld --> works
www.domain2.tld --> works
domain2.tld --> works
webmail.domain1.tld --> squirrelmail
webmail.domain2.tld --> squirrelmail

The issue with the apache setup I'm having now is that I don't want the IP address or any unconfigured domains that point to the server IP (e.g. mail.domain1.tld, mail.domain2.tld) to point to the "It works!" bit in /var/www.

I'd like a "default" vhost that every unconfigured domain is routed to.
Can I edit /etc/apache2/sites-available/default for this purpose to point to e.g. /var/www/default? (I'd then put a single index.html in there saying "you've reached an unconfigured domain")

Is it advisable to manually create a seperate vhost for accessing things such as the amavis-stats etc ?

What is the general advice on how to handle "default pages" and the webmail thing ?

I hope what I wrote made some sense and you can give me some advice.

Thanks

Chris
Reply With Quote
Sponsored Links
  #2  
Old 5th July 2009, 12:26
voidzero voidzero is offline
HowtoForge Supporter
 
Join Date: Mar 2009
Posts: 63
Thanks: 11
Thanked 3 Times in 3 Posts
Default

Well, the default currently is set to /var/www - all you'd do is change it to /var/www/default. I'm using .htaccess files to customize the behaviour - both simple, and it has tons of options.

About webmail; I wouldn't symlink the webmail bit - see my post here for a .htaccess solution.

Amavis stats, dunno, never used them
Reply With Quote
  #3  
Old 5th July 2009, 15:05
ChristianFe ChristianFe is offline
Junior Member
 
Join Date: Apr 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thanks for your answer. Your solution is certainly an interesting alternative to handle the webmail issue, especially as it means that one doesn't have to set up things manually if new domains are added or something like that.

still not sure about the "default" vhost though. Looks to me like it is potentially unsafe to have it point to "/var/www" or is that just me being paranoid and just plain wrong about this ?
Reply With Quote
  #4  
Old 5th July 2009, 15:55
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,045
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
Default

Quote:
still not sure about the "default" vhost though. Looks to me like it is potentially unsafe to have it point to "/var/www" or is that just me being paranoid and just plain wrong about this ?
This is not unsafe as all relevant directories used by ISPConfig are secured and can not be accessed trough the default vhost.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 5th July 2009, 16:02
ChristianFe ChristianFe is offline
Junior Member
 
Join Date: Apr 2009
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Default

alright so there's no problem.

I'm running into something else that I don't get though:

I've got one IP pointing to the server.
The vhosts are all set to <VirtualHost *:80>

There is that warning that my_server_ip:80 and my_server_ip:443 have no VirtualHosts, no worries there. That shouldn't be a problem.

I've get a line in /etc/apache2/ports.conf specifying <NameVirtualHost *:80>.
Now if I set any of the virutal host to my_server_ip:80 instead of *:80 every domain and the server IP address just point to that vhost ?

Is it not possible to mix IP and * VirtualHosts ?

Should the "default" one read *:80 or _default_:80 ?

I've had a read through http://httpd.apache.org/docs/2.0/vhosts/examples.html but that didn't help too much.

Thanks for all the help

Chris
Reply With Quote
  #6  
Old 5th July 2009, 16:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,045
Thanks: 826
Thanked 5,384 Times in 4,231 Posts
 
Default

The configuration ISPConfig uses is fine, you dont have to change anything. * is a wildcard and not the same as _default_. And yes, you can mix IP and * based hosts on the same server but not on the same IP, so you need to have more then one IP if you want to mix them.
__________________
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
problems with suexec gobokster Installation/Configuration 7 7th May 2009 13:33
CENTOS 5 Ping Problem gAnDo Server Operation 11 28th March 2008 20:58
Double question: Apache mod_proxy and force connection over specific interface Nukien Server Operation 1 8th January 2008 00:16
Centos 4.4 32bit Hangs, High Server load 3cwired_com Server Operation 11 16th November 2006 15:47
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45


All times are GMT +2. The time now is 13:59.


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