OVH Community, your new community space.

BIND DNS & Apache Virtual Server probs


gregoryfenton
04-01-2010, 22:31
On behalf of team customers support:

You're welcome

nusser49
04-01-2010, 22:29
THANKS !

That sorted it out. Thanks guys, i learned a lot from this

And thanks for watching my mistakes !!

Damn i love it !

gregoryfenton
04-01-2010, 22:12
wait one

read your post carefully:
Code:
Status:	Tilslutter til 213.251.176.21:21...
Status:	Tilslutter til 213.251.173.21:21...
See the difference?

You have a typo in your DNS records

nusser49
04-01-2010, 21:54
Hi

I've changed it, and i didn't make any difference :\.

I'll hope that you guys understood the problem with the domain, that i can't resolve anything from it, ftp or vnc. But from the kimsufi reverse, then i can connect to ftp and VNC.

Log file from filezilla to illustrate the problem:
The IP:
Code:
Status:	Tilslutter til 213.251.176.21:21...
Status:	Forbindelse etableret, venter på velkomstbesked...
Respons:	220 ProFTPD 1.3.1 Server (NetBios' SERVER :D) [213.251.176.21]
Kommando:	USER admin
Respons:	331 Password required for admin
Kommando:	PASS ******
Respons:	230 User admin logged in
The domain:
Code:
Status:	Kontrollerer adressen på nbhosting.eu
Status:	Tilslutter til 213.251.173.21:21...
Status:	Forbindelsesforsøg mislykkedes med "ECONNREFUSED - Connection refused by server".
Fejl:	Kunne ikke forbinde til server
VNC and other things are totally the same :\.

gregoryfenton
04-01-2010, 21:25
Hiya

I hope this post helps you:

First let's deal with some issues:
Code:
www.nbhosting.eu. IN      CNAME   nbhosting.eu.
change to
Code:
*.nbhosting.eu. IN      CNAME   nbhosting.eu.
so we can catch any domain eg test.nbhosting.eu

In the apache config you should also catch the wildcard domains:
Code:
ServerAlias *.nbhosting.eu
If you want to catch a specific domain (eg test.nbhosting.eu) give it its own section in your apache conf *before* the catchall section.

If I use my /etc/apache2/sites-enabled/default.conf you may see where I am coming from:
Code:
UseCanonicalName off


	ServerAdmin webmaster@labby.co.uk

	DocumentRoot /var/www
	
		Options FollowSymLinks -Indexes
		AllowOverride All
	
	
		Options -Indexes FollowSymLinks MultiViews
		AllowOverride All
		Order allow,deny
		allow from all
	

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	
		AllowOverride All
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined

	Alias /doc/ "/usr/share/doc/"
	
		Options Indexes MultiViews FollowSymLinks
	        AllowOverride All
	        Order deny,allow
	        Deny from all
	        Allow from 127.0.0.0/255.0.0.0 ::1/128
	



	DocumentRoot "/var/websites/cartcompany.co.uk"
	ServerName cartcompany.co.uk
	ServerAlias *.cartcompany.co.uk
	ServerAdmin webmaster@cartcompany.co.uk
	ErrorLog /var/log/apache2/error-cartcompany.co.uk.log
	LogLevel warn
	CustomLog /var/log/apache2/access-cartcompany.co.uk.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/ubuntudvds"
	ServerName ubuntudvds.com
	ServerAlias ubuntudvds.co.uk
	ServerAlias *.ubuntudvds.com
	ServerAlias *.ubuntudvds.co.uk
	ServerAdmin webmaster@ubuntudvds.com
	ErrorLog /var/log/apache2/error-ubuntudvds.co.uk.log
	LogLevel warn
	CustomLog /var/log/apache2/access-ubuntudvds.co.uk.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/fedoradvds"
	ServerName fedoradvds.com
	ServerAlias fedoradvds.co.uk
	ServerAlias *.fedoradvds.com
	ServerAlias *.fedoradvds.co.uk
	ServerAdmin webmaster@fedoradvds.com
	ErrorLog /var/log/apache2/error-fedoradvds.co.uk.log
	LogLevel warn
	CustomLog /var/log/apache2/access-fedoradvds.co.uk.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/websites/supaspecsexpress.co.uk"
	ServerName supaspecsexpress.co.uk
	ServerAlias *.supaspecsexpress.co.uk
	ServerAdmin webmaster@supaspecsexpress.co.uk
	ErrorLog /var/log/apache2/error-supaspecsexpress.co.uk.log
	LogLevel warn
	CustomLog /var/log/apache2/access-supaspecsexpress.co.uk.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/clickedit.info"
	ServerName clickedit.info
	ServerAlias *.clickedit.info
	ServerAdmin webmaster@clickedit.info
	ErrorLog /var/log/apache2/error-clickedit.info.log
	LogLevel warn
	CustomLog /var/log/apache2/access-clickedit.info.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/willenhallhardware.co.uk"
	ServerName willenhallhardware.co.uk
	ServerAlias *.willenhallhardware.co.uk
	ServerAdmin webmaster@willenhallhardware.co.uk
	ErrorLog /var/log/apache2/error-willenhallhardware.co.uk.log
	LogLevel warn
	CustomLog /var/log/apache2/access-willenhallhardware.co.uk.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/rsync.labby.co.uk/getdeb.net"
	ServerName getdeb.rsync.labby.co.uk
	ServerAlias *.getdeb.rsync.labby.co.uk
	ServerAlias getdeb.labby.co.uk
	ServerAlias *.getdeb.labby.co.uk
	ServerAdmin webmaster@rsync.labby.co.uk
	ErrorLog /var/log/apache2/error-rsync.labby.co.uk-getdeb.log
	LogLevel warn
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-getdeb.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/rsync.labby.co.uk/playdeb.net"
	ServerName playdeb.rsync.labby.co.uk
	ServerAlias *.playdeb.rsync.labby.co.uk
	ServerAlias playdeb.labby.co.uk
	ServerAlias *.playdeb.labby.co.uk
	ServerAdmin webmaster@rsync.labby.co.uk
	ErrorLog /var/log/apache2/error-rsync.labby.co.uk-playdeb.log
	LogLevel warn
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-playdeb.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/rsync.labby.co.uk/hostip.info"
	ServerName hostip.info.rsync.labby.co.uk
	ServerAlias *.hostip.info.rsync.labby.co.uk
	ServerAlias hostip.info.labby.co.uk
	ServerAlias *.hostip.info.labby.co.uk
	ServerAdmin webmaster@rsync.labby.co.uk
	ErrorLog /var/log/apache2/error-rsync.labby.co.uk-hostip.info.log
	LogLevel warn
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-hostip.info.log combined
	
		allow from all
		Options +Indexes
	
	UseCanonicalName off



	DocumentRoot "/var/websites/rsync.labby.co.uk"
	ServerName rsync.labby.co.uk
	ServerAlias *.rsync.labby.co.uk
	ServerAdmin webmaster@rsync.labby.co.uk
	ErrorLog /var/log/apache2/error-rsync.labby.co.uk.log
	LogLevel warn

	SetEnvIf Request_URI "openoffice" openoffice
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-openoffice.log combined env=openoffice
	SetEnvIf Request_URI "hostip" rsync=hostip
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-hostip.info.log combined env=hostip
	SetEnvIf Request_URI "getdeb" rsync=getdeb
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-getdeb.log combined env=getdeb
	SetEnvIf Request_URI "playdeb" rsync=playdeb
	CustomLog /var/log/apache2/access-rsync.labby.co.uk-playdeb.log combined env=playdeb
	SetEnvIf env openoffice dontlog=true
	SetEnvIf env hostip dontlog=true
	SetEnvIf env getdeb dontlog=true
	SetEnvIf env playdeb dontlog=true
	CustomLog /var/log/apache2/access-rsync.labby.co.uk.log combined env=!dontlog

	
		allow from all
		Options +Indexes
	

	Alias /awstatsclasses "/usr/share/awstats/lib/"
	Alias /awstats-icon/ "/usr/share/awstats/icon/"
	Alias /awstatscss "/usr/share/doc/awstats/examples/css"
	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	ScriptAlias /awstats/ /usr/lib/cgi-bin/
	Options ExecCGI -MultiViews +SymLinksIfOwnerMatch

nusser49
04-01-2010, 20:39
Hi.

Sorry that i have been away, i had holiday, sorry.

But here is a update:

I'm now running Ubuntu Server 8.04 and i installed bind9, apache2 and webmin.

The DNS is binded with these settings:

Code:
$ttl 60
nbhosting.eu. IN      SOA     nbhosting.eu. post.nbhosting.eu. (
                        2010040101
                        10800
                        3600
                        604800
                        60 )
nbhosting.eu. IN      NS      ns.kimsufi.com.
nbhosting.eu. IN      NS      ks34983.kimsufi.com.
nbhosting.eu. IN      A       213.251.173.21
www.nbhosting.eu. IN      CNAME   nbhosting.eu.
nbhosting.eu.   IN      MX      1 mx1.ovh.net.
nbhosting.eu.   IN      MX      10 mx5.ovh.net.
And that works not so good. If i ping the domain, then i receive the right IP. But if i ex. try to connec to ftp, vnc, sbnc and so on. Then I can't connect to the domain.

I'm a bit lost right now. As you can see, then http files is also different, the domain is blank (http://nbhosting.eu/) and the kimsufi url is the right one (http://ks34983.kimsufi.com/)

Please help me out.

Mytau the server is hosted at OVH (dedicated) and so is the Domain, therefore it's me. I'm the adminstrator of the server, i'm just trying to bind a domain to the server .


Thanks a lot so far! - And happy new year.

Myatu
29-12-2009, 21:55
Make sure that the following is defined only once:

Code:
NameVirtualHost *:80
Depending on the distro, this may already be defined in /etc/apache2/ports.conf (like with Debian / Ubuntu). Redefining it somewhere else will cause that message to appear.

Generally speaking, and also depending on the Linux distro, httpd.conf has been included for backwards compatibility and should be left blank.

Usually, you add sites to the /etc/apache2/sites-available directory (ie: "/etc/apache2/sites-available/nbhosting.eu") and enable it with "a2ensite" (or "a2ensite nbhosting.eu" if you do not wish to be asked).

You should have something like this in the file /etc/apache2/sites-available/nbhosting.eu:

Code:

  ServerAdmin webmaster@nbhosting.eu
  ServerName www.nbhosting.eu

  DocumentRoot /var/www
  DirectoryIndex index.html

  
    Options FollowSymlinks
    AllowOverride None
  

  
    Options -Indexes FollowSymlinks Multiviews
    AllowOverride All
    Order allow,deny
    allow from all
  

  CustomLog /var/log/apache2/www_nbhosting_eu.access.log combined
  ErrorLog /var/log/apache2/www_nbhosting_eu.error.log
Then it'll use files from /var/www (ie "/var/www/index.html") whenever www.nbhosting.eu is accessed, and the logs are located in /var/log/apache2.

But aren't you using a web-based administrator to do all this? That admin should take care of most, if not all the things you need to get started. Which one are you using and have you checked their user guide or their website?

nusser49
29-12-2009, 21:05
Thanks Myatu for very usefull guide

The problem is now, that the domain doesn't point to the correct directory.

I've made this virtual apache in the httpd.conf file:

Code:
NameVirtualHost *:80

servername host
serverPath /var/www/
DocumentRoot /var/www/
But when i restart apache2 then it gives me this error (but starts op anyway)

Code:
Restarting web server: apache2[Tue Dec 29 21:10:02 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
 ... waiting [Tue Dec 29 21:10:03 2009] [warn] NameVirtualHost *:80 has no VirtualHosts
.
Thanks so far guys, it's been very usefull .

Btw., my webfiles are located in /var/www/

And the domain nbhosting.eu is the only domain on the server .

I can't figure out if something is very wrong, f.ex i have a VNC running, and i cannot connect to it through the nbhosting.eu only the ip and the ksXXXXX.kimsufi.com

I guess something is very wrong ? - Should i just go the easy way, reinstall and then set it up once again?

Myatu
29-12-2009, 19:34
Just an FYI on the DNS:

Code:
# dig nbhosting.eu ANY

; <<>> DiG 9.5.1-P3 <<>> nbhosting.eu ANY
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28722
;; flags: qr rd ra; QUERY: 1, ANSWER: 10, AUTHORITY: 4, ADDITIONAL: 0

;; QUESTION SECTION:
;nbhosting.eu.                  IN      ANY

;; ANSWER SECTION:
nbhosting.eu.           38394   IN      A       213.251.173.21
nbhosting.eu.           38394   IN      NS      ks34983.kimsufi.com.nbhosting.eu.
nbhosting.eu.           38394   IN      NS      ks34983.kimsufi.com.
nbhosting.eu.           38394   IN      NS      ns.kimsufi.com.nbhosting.eu.
nbhosting.eu.           38394   IN      NS      ns.kimsufi.com.
nbhosting.eu.           38394   IN      SOA     213.251.176.21.nbhosting.eu. support.nbhosting.eu. 1261946251 10800 3600 604800 38400
nbhosting.eu.           38394   IN      MX      1 mx1.ovh.net.nbhosting.eu.
nbhosting.eu.           38394   IN      MX      1 mx5.ovh.net.
nbhosting.eu.           38394   IN      MX      1 mx5.ovh.net.nbhosting.eu.
nbhosting.eu.           38394   IN      MX      1 mx1.ovh.net.

;; AUTHORITY SECTION:
nbhosting.eu.           38394   IN      NS      ks34983.kimsufi.com.nbhosting.eu.
nbhosting.eu.           38394   IN      NS      ns.kimsufi.com.nbhosting.eu.
nbhosting.eu.           38394   IN      NS      ns.kimsufi.com.
nbhosting.eu.           38394   IN      NS      ks34983.kimsufi.com.

;; Query time: 0 msec
;; SERVER: 10.10.24.4#53(10.10.24.4)
;; WHEN: Tue Dec 29 17:57:54 2009
;; MSG SIZE  rcvd: 357
When using BIND DNS, it's very important to use that trailing period (.) because without that BIND will add ".nbhosting.eu". You can see it in the above output with the (numerous) NS servers: "ns.kimsufi.com.nbhosting.eu."

Futhermore, the SOA record contains a serial number. External DNS servers will cache information based on this serial number. So even if you fixed the issue of the missing periods (as you said you've done), external DNS servers will not pick up on these or any other changes you have made.

This is your current SOA record:

Code:
nbhosting.eu.   IN      SOA     213.251.176.21 support.nbhosting.eu. (
                        1261946251
                        10800
                        3600
                        604800
                        38400 )
The second line is the serial number. The new value must be higher than the previous value (very important). Personally I prefer the common standard of using YYYYMMDDcc timestamp, where "YYYY" is the 4-digit year, "MM" is the 2-digit month and "DD" is the 2-digit day. "CC" is an incremental number (starting at "00") to indicate which change it was for the day (ie., the 12th change would be "11"). For today, the serial would be "2009122900".

Also, you shouldn't use the IP address in the SOA record, not to mention that the missing trailing period for the IP address will cause BIND to add ".nbhosting.eu" to it as well. (The IP address differs from what you're using for the web server, I'm not sure if that was intentional -- just wanted to point this out).

So if 213.251.176.21 is indeed the IP address of the DNS server you're running, you should change the SOA to something like this:

Code:
nbhosting.eu.   IN      SOA     ns1.nbhosting.eu. support.nbhosting.eu. (
                        2009291200
                        10800
                        3600
                        604800
                        38400 )
and then add a record for "ns1.nbhosting.eu" as following:

Code:
ns1    IN    A    213.251.176.21
Note that there's only "ns1". As mentioned, if there's no trailing period, BIND will automatically change this into "ns1.nbhosting.eu".

You'd want to point the 2nd DNS server to OVH (which you can use for free). The CNAME you're using record is fine. As for the MX records change one of them to a higher value (so it's clearly marked which one is "primary" and "secondary"). For example:

Code:
nbhosting.eu.   IN      MX      10 mx1.ovh.net.
nbhosting.eu.   IN      MX      20 mx5.ovh.net.
The above makes "mx5.ovh.net" the secondary (try last).

Now, as for Apache, both http://www.nbhosting.eu/index.html and and http://213.251.173.21/index.html show pages of 0-bytes in size. In other words, the "index.html" being served is completely empty.

You've shown the contents of the default Apache configuration (/etc/apache2/sites-enabled/default.conf). The index file it should pick up in the "default" case should be located in /var/www/index.html. A default in this case is accessing your web server by the IP address instead of the domain name.

From the screenshot you've provided, "nbhosting.eu" also uses /var/www/ as its base directory, so even though you have a separate entry for "nbhosting.eu", you're still using the /var/www/index.html -- the same from your default. You should change this if you want it to be different (so wherever on the web-based admin you do this, use something like /var/www/nbhosting.eu/ as the base directory).

One more pointer, you may need to use "*.nbhosting.eu" instead of "nbhosting.eu" in the web-based admin, otherwise it may not pick up on "www.nbhosting.eu" and only on "nbhosting.eu".

yonatan
29-12-2009, 18:17
can you tell us where are your website files located?
you need to set your DocumentRoot , or configure a Virtual host DocumentRoot to point to your website path.

Paw-Fox
29-12-2009, 17:26
You're making progress, www.nbhosting.eu does connect to your server

C:\Users\David>ping nbhosting.eu
Code:
Pinging nbhosting.eu [213.251.173.21] with 32 bytes of data:
Reply from 213.251.173.21: bytes=32 time=46ms TTL=47
Reply from 213.251.173.21: bytes=32 time=47ms TTL=47
it's now the matter of configuring apache for the virtual domains..

nusser49
29-12-2009, 17:13
Yes, the DirectAdmin team desereves the money, but i thourgh i was possible to set the domain up, and then stop the license. But thanks

I tried what you said Paw-Fow, but it's still not working.

My domain is at OVH and so is the server (surprise). But, here is what i've setup in the manager:

Code:
 Here is the list of DNS associated to the domain nbhosting.eu :
	DNS server name 	DNS server IP 	
	ns1.nbhosting.eu        	       213.251.176.21 	
	ns2.nbhosting.eu        	       213.251.176.21
I thourgh that this would do the trick, but no :\.

Any ideas?

yonatan
29-12-2009, 16:32
Quote Originally Posted by nusser49

Btw. the DirectAdmin, can i pay for the first month, then setup the dns and then stop with it, will the DNS configuration still work then?
- But i prefer to do it through webmin og manually.
No, directadmin license will stop working and you wont be able to access your hosting accounts.

and i would not recommend even trying , they are fine people who deserve to get paid of the hard work they put into the awesome control panel they made for us.

you can still go the webmin way, but you must understand how to configure your DNS server.

Paw-Fox
29-12-2009, 16:25
ok, yonatan is right,

in your "/var/lib/bind/nbhosting.eu.hosts" file replace it with this (make backup if you wish)

Code:
$ttl 60
nbhosting.eu. IN      SOA     nbhosting.eu. post.nbhosting.eu. (
                        1234404394
                        10800
                        3600
                        604800
                        60 )
nbhosting.eu. IN      NS      ns1.nbhosting.eu.
nbhosting.eu. IN      NS      ns2.nbhosting.eu.
nbhosting.eu. IN      A       213.251.173.21
www.nbhosting.eu. IN      CNAME   nbhosting.eu.
ns1.nbhosting.eu. IN      A       213.251.173.21
ns2.nbhosting.eu. IN      A       213.251.173.21 ## If you're using a IPfailover then use the IP here]
nbhosting.eu.   IN      MX      1 mx1.ovh.net.
nbhosting.eu.   IN      MX      1 mx5.ovh.net.
Now go to your domain registrar and "Register" the IP's of your server as ns1.nbhosting.eu
and your fail-over as your second ns2.nbhosting.eu

Try that, monitor your progress at: http://www.intodns.com/ it's a very helpful site

nusser49
29-12-2009, 14:59
Hi.

I've changed the dns conf, now it looks like this:

- i didn't figure the whole ns1 and ns2 thin out, so i guess this would work also:

Code:
$ttl 38400
nbhosting.eu.   IN      SOA     213.251.176.21 support.nbhosting.eu. (
                        1261946251
                        10800
                        3600
                        604800
                        38400 )
nbhosting.eu.   IN      NS      ks34983.kimsufi.com.
nbhosting.eu.   IN      A       213.251.173.21
www.nbhosting.eu. IN CNAME nbhosting.eu.
nbhosting.eu.   IN      MX      1 mx1.ovh.net.
nbhosting.eu.   IN      MX      1 mx5.ovh.net.
nbhosting.eu.   IN      NS      ns.kimsufi.com.
Btw. the DirectAdmin, can i pay for the first month, then setup the dns and then stop with it, will the DNS configuration still work then?
- But i prefer to do it through webmin og manually.

yonatan
29-12-2009, 14:31
the problem

nbhosting.eu. IN NS ks34983.kimsufi.com.
nbhosting.eu. IN NS ks34983.kimsufi.com

and

nbhosting.eu. IN NS ns.kimsufi.com.
nbhosting.eu. IN NS ns.kimsufi.com

you need to point it correctly and setup your DNS server if you want to manage it from your server.

and you must have a dot in the end like " ns.kimsufi.com. " not " ns.kimsufi.com "

delete all ns records.

create new ns records like

ns1.nbhosting.eu.
ns2.nbhosting.eu.

point your domain registrar over to the server IP address
with ns1.nbhosting.eu (IP OF YOUR SERVER)
with ns2.nbhosting.eu (FAILOVER IP OF YOUR SERVER)

set the ns1 and ns2 as A records with the same IP on your server, so you can resolve it locally before dns update ( and debug it also like that ).


another option, chip in, get DirectAdmin control panel, it would make you life much easy.

nusser49
29-12-2009, 14:14
Hi guys, thanks so far.

I see that it could be usefull to have some more information - So i'll post some my configes files here:

named.conf:
Code:
options {
directory "/var/named";
};

controls {};
zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "nbhosting.eu" {
        type master;
        file "/var/lib/bind/nbhosting.eu.hosts";
        };

nbhosting.eu.hosts:

Code:
$ttl 38400
nbhosting.eu.   IN      SOA     213.251.176.21 support.nbhosting.eu. (
                        1261946251
                        10800
                        3600
                        604800
                        38400 )
nbhosting.eu.   IN      NS      ks34983.kimsufi.com.
nbhosting.eu.   IN      NS      ks34983.kimsufi.com
nbhosting.eu.   IN      A       213.251.173.21
www.nbhosting.eu. IN CNAME nbhosting.eu.
nbhosting.eu.   IN      MX      1 mx1.ovh.net
nbhosting.eu.   IN      MX      1 mx1.ovh.net.
nbhosting.eu.   IN      MX      1 mx5.ovh.net
nbhosting.eu.   IN      MX      1 mx5.ovh.net.
nbhosting.eu.   IN      NS      ns.kimsufi.com.
nbhosting.eu.   IN      NS      ns.kimsufi.com

apache2.conf:

Code:
#
ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#
#
LockFile /var/lock/apache2/accept.lock
#
#

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

KeepAliveTimeout 15

##
## Server-Pool Size Regulation (MPM specific)
## 

# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process serves

    StartServers          5
    MinSpareServers       5
    MaxSpareServers      10
    MaxClients          150
    MaxRequestsPerChild   0


# worker MPM
# StartServers: initial number of server processes to start
# MaxClients: maximum number of simultaneous client connections
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxRequestsPerChild: maximum number of requests a server process serves

    StartServers          2
    MaxClients          150
    MinSpareThreads      25
    MaxSpareThreads      75 
    ThreadsPerChild      25
    MaxRequestsPerChild   0


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#

AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#

    Order allow,deny
    Deny from all



DefaultType text/plain


HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a 
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a 
# container, that host's errors will be logged there and not here.
#
ErrorLog /var/log/apache2/error.log

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn

# Include module configuration:
Include /etc/apache2/mods-enabled/*.load
Include /etc/apache2/mods-enabled/*.conf

# Include all the user configurations:
Include /etc/apache2/httpd.conf

# Include ports listing
Include /etc/apache2/ports.conf

#
# The following directives define some format nicknames for use with
# a CustomLog directive (see below).
# If you are behind a reverse proxy, you might want to change %h into %{X-Forwarded-For}i
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

#
# Define an access log for VirtualHosts that don't define their own logfile
CustomLog /var/log/apache2/other_vhosts_access.log vhost_combined

#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# Putting this all together, we can internationalize error responses.
#
# We use Alias to redirect any /error/HTTP_.html.var response to
# our collection of by-error message multi-language collections.  We use 
# includes to substitute the appropriate text.
#
# You can modify the messages' appearance without changing any of the
# default HTTP_.html.var files by adding the line:
#
#   Alias /error/include/ "/your/include/path/"
#
# which allows you to create your own set of files by starting with the
# /usr/share/apache2/error/include/ files and copying them to /your/include/path/, 
# even on a per-VirtualHost basis.  The default include files will display
# your Apache version number and your ServerAdmin email address regardless
# of the setting of ServerSignature.
#
# The internationalized error documents require mod_alias, mod_include
# and mod_negotiation.  To activate them, uncomment the following 30 lines.

#    Alias /error/ "/usr/share/apache2/error/"
#
#    
#        AllowOverride None
#        Options IncludesNoExec
#        AddOutputFilter Includes html
#        AddHandler type-map var
#        Order allow,deny
#        Allow from all
#        LanguagePriority en cs de es fr it nl sv pt-br ro
#        ForceLanguagePriority Prefer Fallback
#    
#
#    ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var
#    ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var
#    ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var
#    ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var
#    ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var
#    ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var
#    ErrorDocument 410 /error/HTTP_GONE.html.var
#    ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var
#    ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var
#    ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var
#    ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var
#    ErrorDocument 415 /error/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var
#    ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var
#    ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var
#    ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var
#    ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var
#    ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var



# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
Include /etc/apache2/conf.d/

# Include the virtual host configurations:
Include /etc/apache2/sites-enabled/
/etc/apache2/sites-enabled/default conf:


Code:

	ServerAdmin webmaster@localhost
	
DocumentRoot /var/www/
	
		Options FollowSymLinks
		AllowOverride None
	
	
		Options Indexes FollowSymLinks MultiViews
		AllowOverride None
		Order allow,deny
		allow from all
	

	ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
	
		AllowOverride None
		Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
		Order allow,deny
		Allow from all
	

	ErrorLog /var/log/apache2/error.log

	# Possible values include: debug, info, notice, warn, error, crit,
	# alert, emerg.
	LogLevel warn

	CustomLog /var/log/apache2/access.log combined

    Alias /doc/ "/usr/share/doc/"
    
        Options Indexes MultiViews FollowSymLinks
        AllowOverride None
        Order deny,allow
        Deny from all
        Allow from 127.0.0.0/255.0.0.0 ::1/128
    

Hope that if enough, please advice me. I'm stil having the problem

You can check out the problem here:

nbhosting.eu/index.html

213.251.176.21/index.html

Paw-Fox
29-12-2009, 03:57
Have you created a zone file for BIND?

$ttl 60
foxhugs.net. IN SOA foxhugs.net. post.foxhugs.net. (
1234404394
10800
3600
604800
60 )
foxhugs.net. IN NS ns1.foxhugs.net.
foxhugs.net. IN NS ns2.foxhugs.net.
foxhugs.net. IN A x.x.x.x.x (your ip)
foxhugs.net. IN A x.x.x.x.x (your ip)
www.foxhugs.net. IN CNAME foxhugs.net.
ns1.foxhugs.net. IN A x.x.x.x.x (your ip)
ns2.foxhugs.net. IN A x.x.x.x.x (your ip)
so this should be somthing like nbhosting.eu.dns

freshwire
28-12-2009, 23:05
I am not sure about this webmin control panel but check your DocumentRoot is correct path.

nusser49
28-12-2009, 21:53
Hi guys.


- Im having a problem with binding my DNS and the apache virtual server.
Im quite a noob, so bare with me

The problem is, that i've binded the domain to the server (nbhosting.eu), and then i visit it, i shows a blank page. - And if i example navigae to nbhosting.eu/cs - Then it says that the dictory doesn't exist

But if i visit the servers IP or the ksXXXX.kimsufi.com it shows the right page, even ksXXXXX.kimsufi.com/cs

Here is a picture from my webmin controlpanel: URL

Here is the apache virtual stuff: URL

- The server is stored under the Standard httpd.conf file.

Please help me out, i've googled and my own solution is to format the server .

Thanks a lot